Hello,
I am practicing how to create customised LaTex regression results tables in STATA. However, when I try compiling the LaTex results tables into pdf, Latex gives me an error message that reads "LaTex Error: Environment Table Undefined". Could there be a problem with the STATA code I wrote to create the tables? Here is the STATA code I wrote:
use wagepan, clear
xtset nr year
gen lhour = ln(hour)
levelsof year, loc(yr)
loc nyr: word count `yr'
di "NOTE: This is an `nyr' panel data"
forval i = 1/`nyr' {
loc ny: word `i' of `yr'
quietly {
reg lwage lhour educ if year == `ny'
margins, dyex(educ)
matrix eta = r(b)
matrix s2eta = r(V)
matrix list eta
matrix list s2eta
eststo, add(eta_educ eta[1, 1] s_educ sqrt(s2eta[1, 1]))
reg lwage lhour educ black hisp if year == `ny'
margins, dyex(educ)
matrix eta = r(b)
matrix s2eta = r(V)
matrix list eta
matrix list s2eta
eststo, add(eta_educ eta[1, 1] s_educ sqrt(s2eta[1, 1]))
reg lwage lhour educ c.exper##c.exper black hisp if year == `ny'
margins, dyex(educ exper)
matrix eta = r(b)
matrix s2eta = r(V)
matrix list eta
matrix list s2eta
eststo, add(eta_educ eta[1, 1] s_educ sqrt(s2eta[1, 1]) eta_exper eta[1, 2] s_exper sqrt(s2eta[1, 2]))
}
esttab _all using lwage`ny'.tex, replace ti("Wage Equation Estimation for `ny'") ///
label nomtitle nodepvars not se noobs ar2 booktabs ///
scalar(eta_educ s_educ eta_exper s_exper) ///
addnotes("$\eta$: Semi-elasticity of lwage with respect to educ, exper" ///
"$\eta_{se}$: Standard errors of the semi-elasticity") ///
substitute("_cons" "Constant" "eta_educ" "$\eta_{educ}$" "s_educ" ///
"$\eta_{se}$" "eta_exper" "$\eta_{exper}$" "s_exper" "$\eta_{se}$" ///
"c.exper#c.exper" "Experience$^2$")
}
I NEED HELP PLEASE
Related Posts with Difficulty in accessing my results tables via LaTex
Power calculation using pairwise matching design.Hi All, For our cluster level specification, we are currently using “clustersampsi” command in Stat…
VentilesHello, I want to take a variable of mine, put it into ventiles, then use collapse to graph the mean…
How to correct a time-varying variable that assumes two different values within the same period for the same IDDear all, I am working with an administrative dataset that contains a string variable that might as…
Export trade durationHello, I am trying to assign consecutive years of exports to my data. My data consists of Years, pr…
Questions about testing equality of survivor functions in matched patient dataI have two different datasets of patients and I would like to perform survival analyses to compare t…
Subscribe to:
Post Comments (Atom)
0 Response to Difficulty in accessing my results tables via LaTex
Post a Comment