There are two sets of interactions of ethnicity and gender that have been created in the PTC.
Rracegender_1 through Rracegender_10 are interaction terms for the ethnicity and gender variables that already exist in the PTC. They are calculated using the following lines of code in Stata:
egen racegender = group(ethnicity_imputed_code gender_code)
xi, pref(R) noomit i.racegender
This produces a list of variables that are useful for certain types of syntactic shortcuts in Stata such as “tab1 Rracegender_*”.
They are somewhat opaque in terms of what they refer to and would require decoding from the underlying values of the two variables used in their construction. That is, ethnicity_imputed_code includes the following values:
- 1 – White, Non Hispanic
- 2 – Black, Non-Hispanic
- 4 – Hispanic, Other
- 5 – Asian or Pacific Islander
- 6 – American Indian or Native Alaskan
and gender_code includes the following values:
So the first racegender recode (Rracegender_1) refers to the first combination of the two: White, Non-Hispanic Females. The last recode (_10) refers to American Indian or Native Alaskan Males.The full breakdown is as follows:
- Rracegender_1 = White Female
- Rracegender_2 = White Male
- Rracegender_3 = Black Female
- Rracegender_4 = Black Male
- Rracegender_5 = Hispanic Female
- Rracegender_6 = Hispanic Male
- Rracegender_7 = Asian Female
- Rracegender_8 = Asian Male
- Rracegender_9 = American Indian Female
- Rracegender_10 = American Indian Male
There are also slightly less opaque version created using the following syntax:
gen af = ethnicity_imputed_code==5 & gender_code=="F" // Asian Female
gen am = ethnicity_imputed_code==5 & gender_code=="M" // Asian Male
gen bf = ethnicity_imputed_code==2 & gender_code=="F" // Black Female
gen bm = ethnicity_imputed_code==2 & gender_code=="M" // Black Male
gen hf = ethnicity_imputed_code==4 & gender_code=="F" // Hispanic Female
gen hm = ethnicity_imputed_code==4 & gender_code=="M" // Hispanic Male
gen wf = ethnicity_imputed_code==1 & gender_code=="F" // White Female
gen wm = ethnicity_imputed_code==1 & gender_code=="M" // White Male
gen amerind = ethnicity_imputed_code==6 // American Indian
Note that for the last group only a single dummy variable has been created. This is because the number of American Indian students at CUNY tends to be so low that often issues of cell size are encountered. Should a researcher need to create dummy variables for these students, they are welcome to do so.