Hi
I run two restricted sample models.
Where in the first subsample I run the model for age group 5-10. In the second sample I run the same specifictaion for age group 10-16.
How can I test the difference in the coeffcients for say read_score and the other scores in`y' between the two samples?
How do I outreg all of this to an excel file?
I run two restricted sample models.
Where in the first subsample I run the model for age group 5-10. In the second sample I run the same specifictaion for age group 10-16.
How can I test the difference in the coeffcients for say read_score and the other scores in`y' between the two samples?
How do I outreg all of this to an excel file?
preserve
keep if child_age>4 & child_age<11
************************************************** *************************************
foreach x in sd_vc_body_out_high2 {
foreach y in math_score read_score english_score {
xtreg `y' `x' controls i.year i.child_age , fe cl(distid)
sum `y' if e(sample)
outreg2 using "${results1}/age5to10score_`x'",dta bdec(4) dec(4) nocons title(`x') append ctitle(`y') keep(`y' `x') addstat( "mean of outcome",r(mean)) alpha(0.01, 0.05, 0.1, 0.15) symbol(***, **, *, †)
}
}
restore
************************************************** *******
****************************11-16************************
preserve
keep if child_age>10 & child_age<17
************************************************** *************************************
foreach x in sd_vc_body_out_high2 {
foreach y in math_score read_score english_score {
xtreg `y' `x' controls i.year i.child_age , fe cl(distid)
sum `y' if e(sample)
outreg2 using "${results1}/age11to16score_`x'",dta bdec(4) dec(4) nocons title(`x') append ctitle(`y') keep(`y' `x') addstat( "mean of outcome",r(mean)) alpha(0.01, 0.05, 0.1, 0.15) symbol(***, **, *, †)
}
}
restore
keep if child_age>4 & child_age<11
************************************************** *************************************
foreach x in sd_vc_body_out_high2 {
foreach y in math_score read_score english_score {
xtreg `y' `x' controls i.year i.child_age , fe cl(distid)
sum `y' if e(sample)
outreg2 using "${results1}/age5to10score_`x'",dta bdec(4) dec(4) nocons title(`x') append ctitle(`y') keep(`y' `x') addstat( "mean of outcome",r(mean)) alpha(0.01, 0.05, 0.1, 0.15) symbol(***, **, *, †)
}
}
restore
************************************************** *******
****************************11-16************************
preserve
keep if child_age>10 & child_age<17
************************************************** *************************************
foreach x in sd_vc_body_out_high2 {
foreach y in math_score read_score english_score {
xtreg `y' `x' controls i.year i.child_age , fe cl(distid)
sum `y' if e(sample)
outreg2 using "${results1}/age11to16score_`x'",dta bdec(4) dec(4) nocons title(`x') append ctitle(`y') keep(`y' `x') addstat( "mean of outcome",r(mean)) alpha(0.01, 0.05, 0.1, 0.15) symbol(***, **, *, †)
}
}
restore
Comment