Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: -esttab- after margins
From
"Haiyong Xu" <[email protected]>
To
<[email protected]>
Subject
st: -esttab- after margins
Date
Mon, 25 Jun 2012 16:03:59 -0700
Hi there,
I ran two -margins- commands after a logit model. The output looks like
this.
. margins res_any_pd
Predictive margins Number of obs =
14330
Model VCE : Linearized
Expression : Pr(w2_pred_obese), predict()
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
res_any_pd |
0 | .3051124 .0054582 55.90 0.000 .2944145
.3158102
1 | .3306719 .0167294 19.77 0.000 .2978829
.3634608
------------------------------------------------------------------------------
. margins, dydx(res_any_pd)
Average marginal effects Number of obs =
14330
Model VCE : Linearized
Expression : Pr(w2_pred_obese), predict()
dy/dx w.r.t. : 1.res_any_pd
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
1.res_any_pd | .0255595 .0174061 1.47 0.142 -.0085558
.0596747
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
I am thinking of using -exttab- or -extout- to print a table like this.
res_any_pd 0: .3051124
res_any_pd 1: .0255595 (-.0085558, .0596747)
So, I only want to print out the point estimate of res_any_pd at zero and
the difference between one and zero with its CI. I tried -estpost-
and -estadd- but got some error because the two -margins- output the same
matrices. Could someone give me some suggestions?
Thank you very much!
Haiyong
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/