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]
Re: st: margins / over / dydx
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: margins / over / dydx
Date
Thu, 05 Jan 2012 00:17:24 -0500
At 11:48 PM 1/4/2012, Robert Duval wrote:
Thanks to Richard and Jeff for their prompt solutions.
They will make me speed up my upgrade of Stata 11 to 12.
Until you get that copy of Stata 12 you have always dreamed about,
will this do?
use http://www.stata-press.com/data/r11/margex, clear
probit outcome sex##group age distance arm
margins, over(sex) post
lincom 1.sex - 0.sex
The last command yields
. lincom 1.sex - 0.sex
( 1) - 0bn.sex + 1.sex = 0
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | .1779789 .012027 14.80 0.000 .1544063 .2015515
------------------------------------------------------------------------------
The lincom coefficient and std error are stored in r matrices in case
you want to be able to retrieve the results.
You do have to post the margins results. For some reason you didn't
seem to like that. But remember, you can save and restore the probit
results and then run a different margins command, e.g.
use http://www.stata-press.com/data/r11/margex, clear
probit outcome sex##group age distance arm
est store m1
margins, over(sex) post
lincom 1.sex - 0.sex
est restore m1
margins, dydx(sex)
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/