Hello,
I am trying to use estadd to export to Latex the value of a Chow test that I calculate in a loop in Stata. I share a simplified reproducible example below.
The problem that I am facing is that when I export it to Latex, the output that I have is the following:

When instead I need the actual number of the "nmb" scalars to appear. There is clearly an issue with the way I call the local variables in the line
. By the way, the correct results are the following:
Thanks for your help
I am trying to use estadd to export to Latex the value of a Chow test that I calculate in a loop in Stata. I share a simplified reproducible example below.
HTML Code:
forvalues i = 1/5 { eststo: quietly reg price mpg if rep78 == `i' scalar RSS`i' = e(rss) scalar N`i' = e(N) scalar nmb`i' = RSS`i' + N`i' estadd local number "nmb`i'" } esttab, s(N number r2_a,label("N" "Just a Number" "Adjusted R2"))
When instead I need the actual number of the "nmb" scalars to appear. There is clearly an issue with the way I call the local variables in the line
HTML Code:
estadd local number "nmb`i'"
HTML Code:
nmb1 = 2 nmb2 = 50336485 nmb3 = 2.366e+08 nmb4 = 47043743 nmb5 = 36471571
Comment