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
Reshape long to wide errorHello stateliest, Im having trouble trying to reshape my data set from long-wide. My code can be fou…
How do I drop dates => than 01.may 2013?When I write: drop if=>01may2013 stata replices "01may2013 invalid name" …
Insufficient observations for fixed effects regression using xtsetHi, My Stata version is 13.1. I am trying some small scale fixed effects regression to test if my ma…
Calculate mean when values are missingI need to create a variable that is the mean of the observations from three other variables. I did t…
Finding the response rate to questionnaireDear Statalist, I have a survey data about the respondents' beverage intake information across mult…
Subscribe to:
Post Comments (Atom)
0 Response to Difficulty in accessing my results tables via LaTex
Post a Comment