Since I started using Stata 17, I encountered a problem that I cannot seem to fix. Normally, I would use the estadd local to add notes at the end of columns in the tables, but now the command doesn’t seem to work. You can see an example of my code as well as the table output below. Do you have any suggestions on how I can used estadd in Stata 17?
eststo clear
eststo: reghdfe defaulted2 i.gender_num#i.marital_stat share, noabsorb
estadd local fixedeff ="No"
sum `e(depvar)' if e(sample)==1
estadd scalar mean =r(mean)
eststo: reghdfe defaulted2 i.gender_num#i.marital_stat accepted, noabsorb
estadd local fixedeff ="No"
sum `e(depvar)' if e(sample)==1
estadd scalar mean =r(mean)
eststo: reghdfe defaulted2 i.gender_num#i.marital_stat share, absorb(zone_num month_year)
estadd local fixedeff ="Yes"
sum `e(depvar)' if e(sample)==1
estadd scalar mean =r(mean)
eststo: reghdfe defaulted2 i.gender_num#i.marital_stat accepted, absorb(zone_num month_year)
estadd local fixedeff ="Yes"
sum `e(depvar)' if e(sample)==1
estadd scalar mean =r(mean)
esttab using “tab1.tex", star(* 0.10 ** 0.05 *** 0.01) ///
coeflabels( 1.gender_num "Female" ///
0.gender_num "Male" ///
0.marital_stat "Single" ///
1.marital_stat "Married" ///
2.marital_stat "Separated" ///
3.marital_stat "Widowed" ///
0bn.gender_num#1bn.marital_stat "Male \times Married" ///
0bn.gender_num#2.marital_stat "Male \times Separated" ///
0bn.gender_num#3.marital_stat "Male \times Widowed" ///
1.gender_num#0.marital_stat "Female \times Single" ///
1.gender_num#1bn.marital_stat "Female \times Married" ///
1.gender_num#2.marital_stat "Female \times Separated" ///
1.gender_num#3.marital_stat "Female \times Widowed" ///
share "Share granted" ///
accepted "Granted amount requested=1") ///
nonum nomtitle drop(_cons 0bn.gender_num#0bn.marital_stat) b(3) se(4) ///
stats(mean fixedeff N, label("Mean dep. var" "FE" "Observations") fmt(%5.3f 1 %12.0gc))
Array
0 Response to estadd local not working in Stata 17
Post a Comment