I am using Stata 16.0.
I am having a very weird error. When I run the following code, I get the error "coefficient bbb_spd not found" with the return code r(111). Note that I have changed the variable names for this.
Note, though, that looking at the output of each of the regressions, the variable bbb_spd does have a coefficient for each of them.
Yet, when I simply switch the order inside the esttab indicate option, such that the final command reads:
The code runs perfectly fine. Does anyone have an idea of what could be going wrong? I recognize that "just switch the order" is a solution, but I have this code written in many different locations, so it would be burdensome. Also I am simply curious about the solution.
I am having a very weird error. When I run the following code, I get the error "coefficient bbb_spd not found" with the return code r(111). Note that I have changed the variable names for this.
Code:
global GLOB1 "a1 a2 a3 a4 a5" global GLOB2 "b1 b2 b3 b4 b5 b6 b7" global GLOB3 c8 c2 c3 c5 c9 global GLOB4 aaa aa a bbb bb b ccc cc_def global GLOB5 bbb_spd reg depVar indic any any_x_indic $GLOB1 $GLOB2 $GLOB3 $GLOB4 $GLOB5 est store r1 estadd local cond "All" reg depVar indic any any_x_indic $GLOB1 $GLOB2 $GLOB3 $GLOB4 $GLOB5 if cond== 1 est store r2 estadd local cond "Some" esttab * using `output'/`1'_2.tex, indicate ("First Controls = $GLOB2" /// "Second Controls = $GLOB3" "Third Controls = $GLOB4" "Fourth Controls = $GLOB5") /// scalars("cond") style(tex) replace
Yet, when I simply switch the order inside the esttab indicate option, such that the final command reads:
Code:
esttab * using `output'/`1'_2.tex, indicate ("First Controls = $GLOB2" /// "Second Controls = $GLOB3" "Fourth Controls = $GLOB5" "Third Controls = $GLOB4") /// scalars("cond") style(tex) replace
Comment