Module 4: Conditions and Subsetting Data Flashcards
1
Q
What is the general format for if-then statements?
A
If (condition) then action; else action;
2
Q
How do you set up nested if-then statements?
A
If (condition) then action;
Else if (conditon) then action;
else/else if ….etc.;
3
Q
What is the difference between drop and delete statement?
A
Drop excludes variables and delete excludes observations
4
Q
T/F: if female is the same as if female = 1.
A
True