Hi all, my race control variables for moms and dads in my data are highly correlated, so I am trying to combine mother and father race variables into dummy variables. Here is the syntax I used:
gen pasian = 1 if P1_Race == 3 & P2_Race ==3
replace pasian = 0 if P1_Race < 3 & P2_Race < 3
replace pasian = 0 if P1_Race > 3 & P2_Race > 3
I decided to make household dummy variables where both partners are Black, white, etc. and a dummy variable for interracial couples. There are 7 race categories: 1= African American 2= Asian American 3= Latino/a 4= White 5= Native American 6= Biracial/Mixed 7=Other.
How many dummy variables should I have and is there better syntax than what I used?
The command I tried using generated a new combined variable, but some of the data was dropped and I cannot figure out why or what other way to create the dummy variables.
Thank you so much for your help!
gen pasian = 1 if P1_Race == 3 & P2_Race ==3
replace pasian = 0 if P1_Race < 3 & P2_Race < 3
replace pasian = 0 if P1_Race > 3 & P2_Race > 3
I decided to make household dummy variables where both partners are Black, white, etc. and a dummy variable for interracial couples. There are 7 race categories: 1= African American 2= Asian American 3= Latino/a 4= White 5= Native American 6= Biracial/Mixed 7=Other.
How many dummy variables should I have and is there better syntax than what I used?
The command I tried using generated a new combined variable, but some of the data was dropped and I cannot figure out why or what other way to create the dummy variables.
Thank you so much for your help!
Comment