/******************* session 7: Regressions by quartile math Johanna Sophie Quis Bamberg Graduate School of Social Sciences (BAGSS) University of Bamberg Data: National Educational Panel Study (NEPS) - Additional Study Baden-Wurttemberg(BW A72 & A73, Version D_2-0-0) Procedure ********************/ // initialize working environment *run "init.do" *run "session1_Profile.do" // Prepare data *do "session2_mergeProfile.do" *run "session3_descriptives-of-students.do" local sessionnum 4 use "${dataDir}mentalhealthadjusted", clear set more off su dropg8alt su txg8 su stdstress la de books 1 "0 to 100" 2 "101 to 200" 3 "201 to 500" 4 "more than 500 books", replace la val t76 books ********************************************************************************* global xlist4 txg8 agemdiff repeated female sports migration ib4.books global xlist5 txg8 agemdiff repeated female sports migration ib4.books mmath ************************************************************************** **** Heterogeneity Age and mathematical ability ************************************************************************* eststo: reg stdstress$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg stdstress $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdstress$xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg stdstress $xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}byagemath.tex", replace stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mgroups("\textbf{Age}" "\textbf{Mathematical ability}", pattern(1 0 0 1 0 0 )) /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath ) eststo clear eststo: reg stdhealth $xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg stdhealth$xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdhealth $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg stdhealth$xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}byagemath.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mtitles("Pooled" "Male" "Female") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath ) eststo clear ***** Short version for paper appendix gen manybooks = 1- (books<=2) tab books manybooks eststo clear eststo: reg stdstress$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg stdstress $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdhealth$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg stdhealth $xlist4 1.txg8#2.magem ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", replace /// b(3) f se booktabs label /// nogaps noobs /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female" ) /// mgroups("\textbf{Stress}" "\textbf{Mental health problems}", pattern(1 0 0 1 0 0 ) /// prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem ) eststo clear eststo: reg stdstress $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg stdstress$xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg stdhealth $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg stdhealth$xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", append /// b(3) f se booktabs label /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.mmath ) eststo clear eststo: reg stdstress$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) bys female: eststo: reg stdstress $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg stdhealth$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) bys female: eststo: reg stdhealth $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", append /// b(3) f se booktabs label /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.manybooks ) eststo clear eststo: reg stdstress $xlist4 1.txg8#1.migration ,vce(cl ID_i) bys female: eststo: reg stdstress$xlist4 1.txg8#1.migration ,vce(cl ID_i) eststo: reg stdhealth $xlist4 1.txg8#1.migration ,vce(cl ID_i) bys female: eststo: reg stdhealth$xlist4 1.txg8#1.migration ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps nomtitles /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.migration ) eststo clear ***** Short version for paper appendix satislife and satischschool eststo clear eststo: reg t1f$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg t1f $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg t1a$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg t1a $xlist4 1.txg8#2.magem ,vce(cl ID_i) esttab using "${outDir}heterogeneity-wellbeing.tex", replace /// b(3) f se booktabs label /// nogaps noobs /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female" ) /// mgroups("\textbf{School}" "\textbf{Life in General}", pattern(1 0 0 1 0 0 ) /// prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem ) eststo clear eststo: reg t1f $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg t1f$xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg t1a $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg t1a$xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}heterogeneity-wellbeing.tex", append /// b(3) f se booktabs label /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.mmath ) eststo clear eststo: reg t1f$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) bys female: eststo: reg t1f $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg t1a$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) bys female: eststo: reg t1a $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) esttab using "${outDir}heterogeneity-wellbeing.tex", append /// b(3) f se booktabs label /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.manybooks ) eststo clear eststo: reg t1f $xlist4 1.txg8#1.migration ,vce(cl ID_i) bys female: eststo: reg t1f$xlist4 1.txg8#1.migration ,vce(cl ID_i) eststo: reg t1a $xlist4 1.txg8#1.migration ,vce(cl ID_i) bys female: eststo: reg t1a$xlist4 1.txg8#1.migration ,vce(cl ID_i) esttab using "${outDir}heterogeneity-wellbeing.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps nomtitles /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.migration ) eststo clear *********************************** * ftests global mmath 1.txg8#2.mmath mmath foreach x in 1.txg8#2.magem 1.txg8#1.manybooks 1.txg8#1.migration{ foreach y in stdstress stdhealth t1f t1a{ di "x' y'" di "pooled" qui: reg y'$xlist4 x' ,vce(cl ID_i) test txg8 + x' = 0 di "male" qui: reg y' $xlist4 x' if female==0 ,vce(cl ID_i) test txg8 + x' = 0 di "female" qui: reg y'$xlist4 x' if female==1 ,vce(cl ID_i) test txg8 + x' = 0 } } foreach y in stdstress stdhealth t1f t1a { di "Math y'" di "pooled" qui: reg y' $xlist5$mmath ,vce(cl ID_i) test txg8 + 1.txg8#2.mmath = 0 di "male" qui: reg y' $xlist4$mmath if female==0 ,vce(cl ID_i) test txg8 + 1.txg8#2.mmath = 0 di "female" qui: reg y' $xlist4$mmath if female==1 ,vce(cl ID_i) test txg8 + 1.txg8#2.mmath = 0 } *supershort for main text eststo clear eststo: reg stdstress $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdhealth$xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg t1f $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg t1a$xlist4 1.txg8#2.magem ,vce(cl ID_i) esttab using "${outDir}heterogeneityshort.tex", replace /// b(3) f se booktabs label wide /// nogaps noobs /// mtitles("\textbf{Stress}" "\textbf{Mental health}" "\textbf{Well-being School}" "\textbf{Well-being Life}") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem ) eststo clear eststo: reg stdstress$xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg stdhealth $xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg t1f$xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg t1a $xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}heterogeneityshort.tex", append /// b(3) f se booktabs label wide /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.mmath ) eststo clear eststo: reg stdstress $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg stdhealth$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg t1f $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg t1a$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) esttab using "${outDir}heterogeneityshort.tex", append /// b(3) f se booktabs label wide /// nogaps nomtitles noobs /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.manybooks ) eststo clear eststo: reg stdstress$xlist4 1.txg8#1.migration ,vce(cl ID_i) eststo: reg stdhealth $xlist4 1.txg8#1.migration ,vce(cl ID_i) eststo: reg t1f$xlist4 1.txg8#1.migration ,vce(cl ID_i) eststo: reg t1a $xlist4 1.txg8#1.migration ,vce(cl ID_i) esttab using "${outDir}heterogeneityshort.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}") label("Observations")) /// b(3) f se booktabs label wide /// nogaps nomtitles /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#1.migration ) eststo clear /* gen manybooks = 1- (books<=2) tab books manybooks eststo clear eststo: reg stdstress $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdstress$xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg stdstress $xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg stdstress$xlist4 1.txg8#1.migration ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", replace stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps wide /// mtitles("\textbf{Higher age}" "\textbf{Higher Math ability}" "\textbf{$>=$200 books}" "\textbf{Migration background}") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath 1.txg8#1.manybooks 1.txg8#1.migration ) eststo clear eststo: reg stdhealth$xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg stdhealth $xlist5 1.txg8#2.mmath ,vce(cl ID_i) eststo: reg stdhealth$xlist4 1.txg8#1.manybooks ,vce(cl ID_i) eststo: reg stdhealth $xlist4 1.txg8#1.migration ,vce(cl ID_i) esttab using "${outDir}heterogeneity.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps wide /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// 1.txg8#1.manybooks "Interaction" /// 1.txg8#1.migration "Interaction" /// 1.txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath 1.txg8#1.manybooks 1.txg8#1.migration ) eststo clear eststo: reg t1f $xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg t1f$xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg t1f $xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg t1f$xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}byagemath.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mtitles("Pooled" "Male" "Female") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath ) eststo clear eststo: reg t1a$xlist4 1.txg8#2.magem ,vce(cl ID_i) bys female: eststo: reg t1a $xlist4 1.txg8#2.magem ,vce(cl ID_i) eststo: reg t1a$xlist5 1.txg8#2.mmath ,vce(cl ID_i) bys female: eststo: reg t1a $xlist5 1.txg8#2.mmath ,vce(cl ID_i) esttab using "${outDir}byagemath.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mtitles("Pooled" "Male" "Female") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female" /// 1.txg8#2.magem "Interaction" /// 1.txg8#2.mmath "Interaction" /// txg8 "Reform (G8)") /// keep(txg8 1.txg8#2.magem 1.txg8#2.mmath ) eststo clear */ ******************************************************************************************************************* **** USING WEIGHTS AND using no controls ******************************************************************************************************************** cap drop weight gen weight = w_t2g8_std replace weight = w_t2g9_std if w_t2g8_std==0 su weight eststo: reg stdstress $xlist4 [pw=weight], vce(cl ID_i) bys female: eststo: reg stdstress$xlist4 [pw=weight] , vce(cl ID_i) eststo: reg stdstress txg8, vce(cl ID_i) bys female: eststo: reg stdstress txg8, vce(cl ID_i) esttab using "${outDir}weights.tex", replace /// b(3) f se booktabs label /// nogaps /// title(Regressions on Stress \label{tab:regBurden}) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers noobs /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female" ) /// mgroups("Using Weights" "No individual controls", pattern(1 0 0 1 0 0 ) /// prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// coef(1.female#1.txg8 "Reform$*$Female") /// keep(txg8) eststo clear foreach y in stdhealth t1f { foreach x in xlist4{ eststo: reg y'$x' [pw=weight], vce(cl ID_i) bys female: eststo: reg y' $x' [pw=weight] , vce(cl ID_i) eststo: reg y' txg8, vce(cl ID_i) bys female: eststo: reg y' txg8, vce(cl ID_i) esttab using "${outDir}weights.tex", append /// b(3) f se booktabs label /// nogaps noobs /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female" ) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female") /// keep(txg8) eststo clear } } eststo: reg t1a $xlist4 [pw=weight], vce(cl ID_i) bys female: eststo: reg t1a$xlist4 [pw=weight] , vce(cl ID_i) eststo: reg t1a txg8, vce(cl ID_i) bys female: eststo: reg t1a txg8, vce(cl ID_i) esttab using "${outDir}weights.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mtitles("Pooled" "Male" "Female" "Pooled" "Male" "Female" ) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female") /// keep(txg8 ) eststo clear ******************************************************************************** **** Using wave 1 and 3 ******************************************************************************** use "${dataDir}mentalhealthWave13", clear eststo: reg stdstress $xlist4 , vce(cl ID_i) bys female: eststo: reg stdstress$xlist4, vce(cl ID_i) esttab using "${outDir}wave13.tex", replace /// b(3) f se booktabs label /// nogaps /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers noobs /// mtitles("Pooled" "Male" "Female" ) /// coef(1.female#1.txg8 "Reform$*$Female") /// keep(txg8) eststo clear eststo: reg stdhealth$xlist4 , vce(cl ID_i) bys female: eststo: reg stdhealth $xlist4 , vce(cl ID_i) esttab using "${outDir}wave13.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// nomtitles /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female") /// keep(txg8) eststo clear /* use "${dataDir}mentalhealthWave13", clear eststo: reg stdstress$xlist4 , vce(cl ID_i) bys female: eststo: reg stdstress $xlist4, vce(cl ID_i) esttab using "${outDir}wave13.tex", replace /// b(3) f se booktabs label /// nogaps /// title(Regressions on Stress \label{tab:regBurden}) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers noobs /// mtitles("Pooled" "Male" "Female" ) /// coef(1.female#1.txg8 "Reform $*$ Female") /// keep(txg8) eststo clear foreach y in stdhealth t1f { foreach x in xlist4{ eststo: reg y' $x' , vce(cl ID_i) bys female: eststo: reg y'$`x' , vce(cl ID_i) esttab using "${outDir}wave13.tex", append /// b(3) f se booktabs label /// nogaps noobs /// mtitles("Pooled" "Male" "Female" ) /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform$*$Female") /// keep(txg8) eststo clear } } eststo: reg t1a$xlist4 , vce(cl ID_i) bys female: eststo: reg t1a $xlist4 , vce(cl ID_i) esttab using "${outDir}wave13.tex", append stats(N, fmt(%18.3g) layout("\multicolumn{1}{c}{@}""\multicolumn{1}{S}{@}") label("Observations")) /// b(3) f se booktabs label /// nogaps /// mtitles("Pooled" "Male" "Female") /// star(* 0.10 ** 0.05 *** 0.01) nonote nonumbers /// coef(1.female#1.txg8 "Reform $*$ Female") /// keep(txg8) eststo clear */