The original variable for race has the following categories for participants:
1 = White
2 = African American/Black
3 = Asian
4 = Other
For my analysis, I am only interested in White and African American/Black participants. I want to create a new variable: race_dich_pt using the if then else statement. What do I do with categories 3 and 4?
if race = 1 then race_dich_pt = 1; /*White*/
else if race = 2 then race_dich_pt = 0; /*African American/Black*/
else if race = 3 then race_dich_pt =
else if race = 4 then race_dich_pt =
else if race = . then race_dich_pt = .;