I am illustrating my code on the publicly available dataset below (this is not my actual model):
Code:
webuse womenwk replace wage=0 if wage==. nehurdle wage children married age education, trunc select(children age) margins, eydx(*) predict(ytrun) post //margins1 margins, eydx(*) predict(psel) post //margins2 est store est1 esttab est1 using prelim, tex replace
1. If I use the post option to get the first set of estimates (ytrun), Stata doesn't allow me to run the next margins command (psel) since it stores the first set of margins in e().
2, If I don't use the post option, I get only the coefficients and not the margins.
3. If I run nehurdle again between the two margins commands and store the estimates separately, Stata assumes these are results from two different models, and the exported output to LaTeX is not as elegant.
Is there a way to get both margins in the same step or any other another workaround?
************************************************** ***************************************
The command nehurdle is from
st0550 from http://www.stata-journal.com/software/sj19-1
SJ19-1 st0550. Estimation command for data with... / Estimation command
for data with corner / solutions / by Alfonso Sanchez-Penalver, University
of South / Florida, Tampa, FL / Support: alfonso.statalistgmail.com /
After installation, type help {cmd:nehurdle} and / {cmd:nehurdle
The command esttab is from
SJ-7-2 st0085_1 . . . . . . . . . . . . Making regression tables simplified
(help estadd, estout, _eststo, eststo, esttab if installed) . B. Jann
Q2/07 SJ 7(2):227--244
introduces the eststo and esttab commands (stemming from
estout) that simplify making regression tables from stored
estimates
0 Response to Multiple marginal effects with nehurdle command
Post a Comment