clear set mem 500000 use "coll_gst.dta", clear *** need to drop non-reporting states b/c doesn't make sense for these: drop if gmarrinst==0 *** drop maine '95 b/c data problem drop if gstres==20 & year==1995 *** drop 1980 b/c data problems: drop if year==1980 gen pop2=round(pop/1000) gen popwhite2=round(popwhite/1000) gen popblack2=round(popblack/1000) gen popother2=round(popother/1000) gen ldistance=ln(distance+1) replace distance=distance/100 qui xi i.gstres qui for var _Igstres_2-_Igstres_51: qui rename X stX gen t=year-1980 gen t2=t^2 qui xi i.year qui for var st_Igstres_2-st_Igstres_51: gen tX=t*X qui for var st_Igstres_2-st_Igstres_51: gen t2X=t2*X sum rateall if gstres~=5 [fw=pop2] sum ratewhite if gstres~=5 & ginstwhite~=0 [fw=popwhite2] sum rateblack if gstres~=5 & ginstwhite~=0 [fw=popblack2] sum rateother if gstres~=5 & ginstwhite~=0 [fw=popother2] sum rateall if gstres~=5 & distance~=. [fw=pop2] sum ratewhite if gstres~=5 & ginstwhite~=0 & distance~=. [fw=popwhite2] sum rateblack if gstres~=5 & ginstwhite~=0 & distance~=. [fw=popblack2] sum rateother if gstres~=5 & ginstwhite~=0 & distance~=. [fw=popother2] *** do for all gstres: areg rateall bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg ratewhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg rateblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg rateother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** using distance measure for Appendix Table 2: areg rateall distance ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store alld areg ratewhite distance ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store whited areg rateblack distance ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store blackd areg rateother distance ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store otherd est table alld whited blackd otherd, b(%9.4f) se(%9.4f) p(%9.4f) keep(distance) stats(N r2) *** Table 5 Panel A: areg gmarrinst bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg ginstwhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg ginstblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg ginstother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** Table 5 Panel B: areg gadjoinst bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg gadjwhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg gadjblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg gadjother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) sum gmarrinst gadjoinst if gstres~=5 [fw=pop2] sum ginstwhite gadjwhite if gstres~=5 & ginstwhite~=0 [fw=popwhite2] sum ginstblack gadjblack if gstres~=5 & ginstwhite~=0 [fw=popblack2] sum ginstother gadjother if gstres~=5 & ginstwhite~=0 [fw=popother2] *** now do for <30 only: use "coll_gst30.dta", clear *** need to drop non-reporting states b/c doesn't make sense for these: drop if gmarrinst==0 *** drop maine '95 b/c data problem drop if gstres==20 & year==1995 *** drop 1980 b/c data problems: drop if year==1980 gen pop2=round(pop/1000) gen popwhite2=round(popwhite/1000) gen popblack2=round(popblack/1000) gen popother2=round(popother/1000) gen ldistance=ln(distance+1) replace distance=distance/100 qui xi i.gstres qui for var _Igstres_2-_Igstres_51: qui rename X stX gen t=year-1980 gen t2=t^2 qui xi i.year qui qui for var st_Igstres_2-st_Igstres_51: gen tX=t*X qui for var st_Igstres_2-st_Igstres_51: gen t2X=t2*X sum rateall if gstres~=5 [fw=pop2] sum ratewhite if gstres~=5 & ginstwhite~=0 [fw=popwhite2] sum rateblack if gstres~=5 & ginstwhite~=0 [fw=popblack2] sum rateother if gstres~=5 & ginstwhite~=0 [fw=popother2] *** do for all gstres: areg rateall bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg ratewhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg rateblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg rateother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** Table 5 Panel A: areg gmarrinst bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg ginstwhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg ginstblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg ginstother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** Table 5 Panel B: areg gadjoinst bldtest ts* t2* _Iy* if gstres~=5 [fw=pop2], absorb(gstres) cluster(gstres) r est store all areg gadjwhite bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popwhite2], absorb(gstres) cluster(gstres) r est store white areg gadjblack bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popblack2], absorb(gstres) cluster(gstres) r est store black areg gadjother bldtest ts* t2* _Iy* if gstres~=5 & ginstwhite~=0 [fw=popother2], absorb(gstres) cluster(gstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) sum gmarrinst gadjoinst if gstres~=5 [fw=pop2] sum ginstwhite gadjwhite if gstres~=5 & ginstwhite~=0 [fw=popwhite2] sum ginstblack gadjblack if gstres~=5 & ginstwhite~=0 [fw=popblack2] sum ginstother gadjother if gstres~=5 & ginstwhite~=0 [fw=popother2] *** now by bride's state: use "C:\Documents and Settings\kbuckles\My Documents\blood_tests\license_data\coll_bst", clear *** need to drop non-reporting states b/c doesn't make sense for these: drop if bmarrinst==0 *** drop maine '95 b/c data problem drop if bstres==20 & year==1995 *** drop 1980 b/c data problems: drop if year==1980 gen pop2=round(pop/1000) gen popwhite2=round(popwhite/1000) gen popblack2=round(popblack/1000) gen popother2=round(popother/1000) gen ldistance=ln(distance+1) replace distance=distance/100 qui xi i.bstres qui for var _Ibstres_2-_Ibstres_51: qui rename X stX gen t=year-1980 gen t2=t^2 qui xi i.year qui for var st_Ibstres_2-st_Ibstres_51: gen tX=t*X qui for var st_Ibstres_2-st_Ibstres_51: gen t2X=t2*X sum rateall if bstres~=5 [fw=pop2] sum ratewhite if bstres~=5 & binstwhite~=0 [fw=popwhite2] sum rateblack if bstres~=5 & binstwhite~=0 [fw=popblack2] sum rateother if bstres~=5 & binstwhite~=0 [fw=popother2] *** do for all bstres: areg rateall bldtest ts* t2* _Iy* if bstres~=5 [fw=pop2], absorb(bstres) cluster(bstres) r est store all areg ratewhite bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popwhite2], absorb(bstres) cluster(bstres) r est store white areg rateblack bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popblack2], absorb(bstres) cluster(bstres) r est store black areg rateother bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popother2], absorb(bstres) cluster(bstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** Table 5 Panel A: areg bmarrinst bldtest ts* t2* _Iy* if bstres~=5 [fw=pop2], absorb(bstres) cluster(bstres) r est store all areg binstwhite bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popwhite2], absorb(bstres) cluster(bstres) r est store white areg binstblack bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popblack2], absorb(bstres) cluster(bstres) r est store black areg binstother bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popother2], absorb(bstres) cluster(bstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) *** Table 5 Panel B: areg badjoinst bldtest ts* t2* _Iy* if bstres~=5 [fw=pop2], absorb(bstres) cluster(bstres) r est store all areg badjwhite bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popwhite2], absorb(bstres) cluster(bstres) r est store white areg badjblack bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popblack2], absorb(bstres) cluster(bstres) r est store black areg badjother bldtest ts* t2* _Iy* if bstres~=5 & binstwhite~=0 [fw=popother2], absorb(bstres) cluster(bstres) r est store other est table all white black other, b(%9.4f) se(%9.4f) p(%9.4f) keep(bldtest) stats(N r2) sum binstwhite badjwhite if bstres~=5 & binstwhite~=0 [fw=popwhite2] sum binstblack badjblack if bstres~=5 & binstwhite~=0 [fw=popblack2] sum binstother badjother if bstres~=5 & binstwhite~=0 [fw=popother2]