************************************************************************************************* * Documentation for Reproduction of * Rios Morrison TESS proposal * XXX * XXX * Stata version 11 ************************************************************************************************* ************************************************************************************************* * open the dataset // see here for the dataset: http://www.tessexperiments.org/data/morrison714.html set more off ************************************************************************************************* ************************************************************************************************* * data on the race of respondents and conditions tab xtess007 tab PPETHM tab xtess007 PPETHM ************************************************************************************************* ************************************************************************************************* * code race of respondents tab PPETHM tab PPETHM, nol gen white = PPETHM recode white (2/5=0) tab PPETHM white gen nonwhite = white recode nonwhite (1=0) (0=1) tab PPETHM nonwhite ************************************************************************************************* ************************************************************************************************* * code experimental conditions tab xtess007 gen eur = xtess007 recode eur (2 3 5 6 = 0) (1 4 = 1) gen wht = xtess007 recode wht (1 3 4 6 = 0) (2 5 = 1) gen ctr = xtess007 recode ctr (1 2 4 5 = 0) (3 6 = 1) tab xtess007 if eur == 1 tab xtess007 if wht == 1 tab xtess007 if ctr == 1 gen Weur = xtess007 recode Weur (2 3 4 5 6 = 0) (1=1) // whites in European American prime gen Wwht = xtess007 recode Wwht (1 3 4 5 6 = 0) (2=1) // whites in white prime gen Wctr = xtess007 recode Wctr (1 2 4 5 6 = 0) (3=1) // whites in control gen NWeur = xtess007 recode NWeur (1 2 3 5 6 = 0) (4=1) // nonwhites in European American prime gen NWwht = xtess007 recode NWwht (1 2 3 4 6 = 0) (5=1) // nonwhites in white prime gen NWctr = xtess007 recode NWctr (1 2 3 4 5 = 0) (6=1) // nonwhites in control tab xtess007 if Weur == 1 tab xtess007 if Wwht == 1 tab xtess007 if Wctr == 1 tab xtess007 if NWeur == 1 tab xtess007 if NWwht == 1 tab xtess007 if NWctr == 1 tab PPETHM if Weur == 1 tab PPETHM if Wwht == 1 tab PPETHM if Wctr == 1 tab PPETHM if NWeur == 1 tab PPETHM if NWwht == 1 tab PPETHM if NWctr == 1 tab Q14_Q15_Ord tab Q14_Q15_Ord, nol gen order1415 = Q14_Q15_Ord - 1 tab order1415 Q14_Q15_Ord ************************************************************************************************* ************************************************************************************************* * clean dependent variables tab1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 tab1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15, nol recode Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 (-1=.) tab1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15, nol tabstat Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15, by(xtess007) stats(mean) format(%9.2f) ************************************************************************************************* ************************************************************************************************* * generate scales alpha Q2 Q3 Q4, std item detail min(2) alpha Q2 Q3 Q4, gen(proethnicALPHA) std item detail min(2) egen proethnicALPHA_std = std(proethnicALPHA) pwcorr proethnicALPHA_std Q2 Q3 Q4 sum proethnicALPHA_std alpha Q5 Q6 Q7, std item detail min(2) alpha Q5 Q6 Q7, gen(oppethpolALPHA) std item detail min(2) egen oppethpolALPHA_std = std(oppethpolALPHA) pwcorr oppethpolALPHA_std Q5 Q6 Q7 sum oppethpolALPHA_std alpha Q8 Q9 Q10 Q11 Q12 Q13, std item detail min(3) alpha Q8 Q9 Q10 Q11 Q12 Q13, gen(resentALPHA) std item detail min(3) egen resentALPHA_std = std(resentALPHA) pwcorr resentALPHA_std Q8 Q9 Q10 Q11 Q12 Q13 sum resentALPHA_std pwcorr Q14 Q15 // Q14=ethnic minorities, Q15=whites gen Q15mQ14 = Q15 - Q14 egen Q15mQ14_std = std(Q15mQ14) sum Q15mQ14_std sum proethnicALPHA_std oppethpolALPHA_std resentALPHA_std Q15mQ14_std ************************************************************************************************* ************************************************************************************************* * missing cases tab xtess007 // 633 total respondents tab xtess007 if proethnicALPHA_std==., mi tab xtess007 if proethnicALPHA_std!=., mi tab xtess007 if oppethpolALPHA_std==., mi tab xtess007 if oppethpolALPHA_std!=., mi tab xtess007 if resentALPHA_std==., mi tab xtess007 if resentALPHA_std!=., mi tab xtess007 if Q15mQ14_std==., mi tab xtess007 if Q15mQ14_std!=., mi ************************************************************************************************* ************************************************************************************************* * Figure 1 svyset[pw=weight] svy, subpop (Weur): reg proethnicALPHA_std svy, subpop (Wwht): reg proethnicALPHA_std svy, subpop (Wctr): reg proethnicALPHA_std svy, subpop (Weur): mean proethnicALPHA_std // this is only for a check against the above set svy, subpop (Wwht): mean proethnicALPHA_std // this is only for a check against the above set svy, subpop (Wctr): mean proethnicALPHA_std // this is only for a check against the above set svy, subpop (Weur): reg oppethpolALPHA_std svy, subpop (Wwht): reg oppethpolALPHA_std svy, subpop (Wctr): reg oppethpolALPHA_std svy, subpop (Weur): reg resentALPHA_std svy, subpop (Wwht): reg resentALPHA_std svy, subpop (Wctr): reg resentALPHA_std svy, subpop (Weur): mean Q15mQ14_std // compare this against next set svy, subpop (Wwht): mean Q15mQ14_std // compare this against next set svy, subpop (Wctr): mean Q15mQ14_std // compare this against next set svy, subpop (Weur): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (Wwht): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (Wctr): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (NWeur): reg proethnicALPHA_std svy, subpop (NWwht): reg proethnicALPHA_std svy, subpop (NWctr): reg proethnicALPHA_std svy, subpop (NWeur): reg oppethpolALPHA_std svy, subpop (NWwht): reg oppethpolALPHA_std svy, subpop (NWctr): reg oppethpolALPHA_std svy, subpop (NWeur): reg resentALPHA_std svy, subpop (NWwht): reg resentALPHA_std svy, subpop (NWctr): reg resentALPHA_std svy, subpop (NWeur): mean Q15mQ14_std // compare this against next set svy, subpop (NWwht): mean Q15mQ14_std // compare this against next set svy, subpop (NWctr): mean Q15mQ14_std // compare this against next set svy, subpop (NWeur): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (NWwht): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (NWctr): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svyset, clear ************************************************************************************************* ************************************************************************************************* * Code pairs for comparison gen WeurWwht = Weur + Wwht recode WeurWwht (2=1) tab WeurWwht // this is for the set of: whites in the European American prime or white prime gen WeurWctr = Weur + Wctr recode WeurWctr (2=1) tab WeurWctr // this is for the set of: whites in the European American prime or control gen WwhtWctr = Wwht + Wctr recode WwhtWctr (2=1) tab WwhtWctr // this is for the set of: whites in the white prime or control gen NWeurNWwht = NWeur + NWwht recode NWeurNWwht (2=1) tab NWeurNWwht // this is for the set of: nonwhites in the European American prime or white prime gen NWeurNWctr = NWeur + NWctr recode NWeurNWctr (2=1) tab NWeurNWctr // this is for the set of: nonwhites in the European American prime or control gen NWwhtNWctr = NWwht + NWctr recode NWwhtNWctr (2=1) tab NWwhtNWctr // this is for the set of: nonwhites in the white prime or control tabstat WeurWwht, by(PPETHM) // this is to double-check coding tabstat WeurWctr, by(PPETHM) tabstat WwhtWctr, by(PPETHM) tabstat NWeurNWwht, by(PPETHM) tabstat NWeurNWctr, by(PPETHM) tabstat NWwhtNWctr, by(PPETHM) tabstat WeurWwht, by(xtess007) tabstat WeurWctr, by(xtess007) tabstat WwhtWctr, by(xtess007) tabstat NWeurNWwht, by(xtess007) tabstat NWeurNWctr, by(xtess007) tabstat NWwhtNWctr, by(xtess007) ************************************************************************************************* ************************************************************************************************* * Table 1, Weighted svyset [pw=weight] svy, subpop (Weur): reg proethnicALPHA_std // test svy, subpop (Wwht): reg proethnicALPHA_std // test svy, subpop (WeurWwht): reg proethnicALPHA_std Weur // reported in Table 1 di -0.0350752-0.0075376 // test to make sure that Weur = the difference in constants svy, subpop (Weur): reg proethnicALPHA_std // test svy, subpop (Wctr): reg proethnicALPHA_std // test svy, subpop (WeurWctr): reg proethnicALPHA_std Weur // not reported in Table 1 di -.0350752-(-.1410192) svy, subpop (Wwht): reg proethnicALPHA_std // test svy, subpop (Wctr): reg proethnicALPHA_std // test svy, subpop (WwhtWctr): reg proethnicALPHA_std Wwht // not reported in Table 1 di .0075376-(-.1410192) * svy, subpop (Weur): reg oppethpolALPHA_std // test svy, subpop (Wwht): reg oppethpolALPHA_std // test svy, subpop (WeurWwht): reg oppethpolALPHA_std Weur // reported in Table 1 di .2445825-.2101697 svy, subpop (Weur): reg oppethpolALPHA_std // test svy, subpop (Wctr): reg oppethpolALPHA_std // test svy, subpop (WeurWctr): reg oppethpolALPHA_std Weur // not reported in Table 1 di .2445825-.2148652 svy, subpop (Wwht): reg oppethpolALPHA_std // test svy, subpop (Wctr): reg oppethpolALPHA_std // test svy, subpop (WwhtWctr): reg oppethpolALPHA_std Wwht // not reported in Table 1 di .2101697-.2148652 * svy, subpop (Weur): reg resentALPHA_std // test svy, subpop (Wwht): reg resentALPHA_std // test svy, subpop (WeurWwht): reg resentALPHA_std Weur // reported in Table 1 di .2005877-.2992764 svy, subpop (Weur): reg resentALPHA_std // test svy, subpop (Wctr): reg resentALPHA_std // test svy, subpop (WeurWctr): reg resentALPHA_std Weur // not reported in Table 1 di .2005877-.1498371 svy, subpop (Wwht): reg resentALPHA_std // test svy, subpop (Wctr): reg resentALPHA_std // test svy, subpop (WwhtWctr): reg resentALPHA_std Wwht // not reported in Table 1 di .2992764-.1498371 *** svy, subpop (Weur): reg Q15mQ14_std order1415 // this set has the control variable for order1415 svy, subpop (Wwht): reg Q15mQ14_std order1415 // this set has the control variable for order1415 di .2852471-.2762799 // this is the difference in constant point estimates in the above two regressions * note that the difference above is equal to the Weur coefficient in the next regression svy, subpop (WeurWwht): reg Q15mQ14_std Weur order1415 Weur#order1415 // used 95% confidence interval for Weur; included interaction term to get estimates for order1415=0 svy, subpop (WeurWctr): reg Q15mQ14_std Weur order1415 Weur#order1415 svy, subpop (WwhtWctr): reg Q15mQ14_std Wwht order1415 Wwht#order1415 *** svy, subpop (NWeur): reg proethnicALPHA_std // test svy, subpop (NWwht): reg proethnicALPHA_std // test svy, subpop (NWeurNWwht): reg proethnicALPHA_std NWeur // reported in Table 1 di .2354042-.1357227 svy, subpop (NWeur): reg proethnicALPHA_std // test svy, subpop (NWctr): reg proethnicALPHA_std // test svy, subpop (NWeurNWctr): reg proethnicALPHA_std NWeur // not reported in Table 1 di .2354042-.0313074 svy, subpop (NWwht): reg proethnicALPHA_std // test svy, subpop (NWctr): reg proethnicALPHA_std // test svy, subpop (NWwhtNWctr): reg proethnicALPHA_std NWwht // not reported in Table 1 di .1357227-.0313074 * svy, subpop (NWeur): reg oppethpolALPHA_std // test svy, subpop (NWwht): reg oppethpolALPHA_std // test svy, subpop (NWeurNWwht): reg oppethpolALPHA_std NWeur // reported in Table 1 di -.5946814-(-.3817734) svy, subpop (NWeur): reg oppethpolALPHA_std // test svy, subpop (NWctr): reg oppethpolALPHA_std // test svy, subpop (NWeurNWctr): reg oppethpolALPHA_std NWeur // not reported in Table 1 di -.5946814-(-.5800143) svy, subpop (NWwht): reg oppethpolALPHA_std // test svy, subpop (NWctr): reg oppethpolALPHA_std // test svy, subpop (NWwhtNWctr): reg oppethpolALPHA_std NWwht // not reported in Table 1 di -.3817734-(-.5800143) * svy, subpop (NWeur): reg resentALPHA_std // test svy, subpop (NWwht): reg resentALPHA_std // test svy, subpop (NWeurNWwht): reg resentALPHA_std NWeur // reported in Table 1 di -.5129576-(-.4187927) svy, subpop (NWeur): reg resentALPHA_std // test svy, subpop (NWctr): reg resentALPHA_std // test svy, subpop (NWeurNWctr): reg resentALPHA_std NWeur // not reported in Table 1 di -.5129576-(-.3855388) svy, subpop (NWwht): reg resentALPHA_std // test svy, subpop (NWctr): reg resentALPHA_std // test svy, subpop (NWwhtNWctr): reg resentALPHA_std NWwht // not reported in Table 1 di -.4187927-(-.3855388) *** svy, subpop (NWeurNWwht): reg Q15mQ14_std NWeur order1415 NWeur#order1415 // used 95% confidence interval for NWeur; included interaction term to get estimates for order1415=0 svy, subpop (NWeurNWctr): reg Q15mQ14_std NWeur order1415 NWeur#order1415 svy, subpop (NWwhtNWctr): reg Q15mQ14_std NWwht order1415 NWwht#order1415 svyset, clear ************************************************************************************************* ************************************************************************************************* * Table 1, unweighted reg proethnicALPHA_std Weur if WeurWwht==1 reg oppethpolALPHA_std Weur if WeurWwht==1 reg resentALPHA_std Weur if WeurWwht==1 reg Q15mQ14_std Weur order1415 Weur#order1415 if WeurWwht==1 reg proethnicALPHA_std NWeur if NWeurNWwht==1 reg oppethpolALPHA_std NWeur if NWeurNWwht==1 reg resentALPHA_std NWeur if NWeurNWwht==1 reg Q15mQ14_std NWeur order1415 NWeur#order1415 if NWeurNWwht==1