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
Non-typical periodicity in panel/time seriesWhen using tsset or xtset, there are a bunch of frequencies that are standard and can be set easily …
Strategy for analyzing 90 observations with a dichotomous dependent variableDear statalisters, I am involved in a project analyzing the effect of Environmental Impact Assessme…
Launch of Cross Sectional Dependence Tests in StataHi Dear, Can you please tell me when or in which year and month Stata introduced cross sectional de…
Stacked bar chart using pre-aggregated census dataHello, I have a table of aggregated data that I downloaded from Census. The first three years of the…
Pooled cross section the best way to analyze non-panel longitudinal data?There are a bunch of datasets, e.g. world values survey, alcohol usage report etc which present good…
Subscribe to:
Post Comments (Atom)
0 Response to Difficulty in accessing my results tables via LaTex
Post a Comment