clear set mem 500000 use rates80_08.dta, clear gen pop2=round(pop/1000) gen t=year-1980 gen t2=t^2 xi i.state i.year for var _Istate_2-_Istate_51: rename X stX for var st_Istate_2-st_Istate_51: gen tX=t*X for var st_Istate_2-st_Istate_51: gen t2X=t2*X ** add controls for minimum ages, waiting periods sort state year _merge state year using minage.dta drop if _merge==2 drop _merge sort state year _merge state year using wait.dta drop if _merge==2 drop _merge gen wait=wait_aft>0 replace wait=1 if wait_bef>0 *** restrict sample to pre-2004, since min ages only available through 2003 drop if consent16==. gen consentlt16=consent<16 rename marrrate marrate ** Here are the results for the table: areg marrate bldtest _Iy* ts* t2* if state~=12 & state~=29 & state~=5 [fw=pop2], absorb(state) cluster(state) r est store A areg marrate bldtest consentlt16 consent16 _Iy* ts* t2* if state~=12 & state~=29 & state~=5 [fw=pop2], absorb(state) cluster(state) r est store B areg marrate bldtest wait _Iy* ts* t2* if state~=12 & state~=29 & state~=5 [fw=pop2], absorb(state) cluster(state) r est store C areg marrate bldtest consentlt16 consent16 wait _Iy* ts* t2* if state~=12 & state~=29 & state~=5 [fw=pop2], absorb(state) cluster(state) r est store D est table A B C D, b(%9.4f) se(%9.4f) p (%9.4f) keep(bldtest consentlt16 consent16 wait) stats(N r2) log close