Hello everyone!
Quick question: I am trying to run some FE regressions to export to Latex and in the Latex tables I would like to 1) indicate which FEs have been used and 2) the coefficients for the time FE (there are two years 1803 and 1806). How can I achieve that? I have tried several combinations, the following is the closest I got, I see which FEs have been used but the years coefficients have not been indicated. Can you help me figuring out where the mistake is? Thanks in advance!
************************************************** ******************************
**** Regressions ****
************************************************** ******************************
keep if insp_yr==1803 | insp_yr==1806
egen geo_id = group(arr_id_reg dpt_id )
egen time_id = group(insp_yr)
xtset geo_id time_id
local depvars Klk Kjk Klf Kjf Kjm Kmm Ksm Kmbm Ksbm
foreach var in `depvars' {
eststo clear
xtreg `var' spy_s, fe
eststo model1
xi: xtreg `var' spy_s i.time_id , fe
eststo model2
xi: xtreg `var' spy_s i.time_id*i.regionn, fe
eststo model3
xi: xtreg `var' spy_s i.time_id*i.dpt_id, fe
eststo model4
esttab model1 model2 model3 model4 using "$path/results/`var'.tex", ///
indicate("Year FEs = *tim*" "Year $\times$ region FEs = *reg*" "Department x year FEs = *dpt*" ) drop(_cons) ///
se label ///
collabels(none) ///
varlabels(_cons "Constant") ///
title("Regression Results for `varLabel'") ///
replace
eststo clear
}
Quick question: I am trying to run some FE regressions to export to Latex and in the Latex tables I would like to 1) indicate which FEs have been used and 2) the coefficients for the time FE (there are two years 1803 and 1806). How can I achieve that? I have tried several combinations, the following is the closest I got, I see which FEs have been used but the years coefficients have not been indicated. Can you help me figuring out where the mistake is? Thanks in advance!
************************************************** ******************************
**** Regressions ****
************************************************** ******************************
keep if insp_yr==1803 | insp_yr==1806
egen geo_id = group(arr_id_reg dpt_id )
egen time_id = group(insp_yr)
xtset geo_id time_id
local depvars Klk Kjk Klf Kjf Kjm Kmm Ksm Kmbm Ksbm
foreach var in `depvars' {
eststo clear
xtreg `var' spy_s, fe
eststo model1
xi: xtreg `var' spy_s i.time_id , fe
eststo model2
xi: xtreg `var' spy_s i.time_id*i.regionn, fe
eststo model3
xi: xtreg `var' spy_s i.time_id*i.dpt_id, fe
eststo model4
esttab model1 model2 model3 model4 using "$path/results/`var'.tex", ///
indicate("Year FEs = *tim*" "Year $\times$ region FEs = *reg*" "Department x year FEs = *dpt*" ) drop(_cons) ///
se label ///
collabels(none) ///
varlabels(_cons "Constant") ///
title("Regression Results for `varLabel'") ///
replace
eststo clear
}
Comment