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: AW: mfx & postfile
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: mfx & postfile
Date
Mon, 8 Mar 2010 15:06:28 +0100
<>
I think you would be much better off with a specialized tool such as -ssc d estout-. But still:
*************
sysuse auto, clear
probit foreign length weight, nolog
mfx
mat point=e(Xmfx_dydx)
mat se=e(Xmfx_se_dydx)
di point[1,1]
di point[1,2]
di se[1,1]
di se[1,2]
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Dimitri Szerman
Gesendet: Montag, 8. März 2010 14:58
An: [email protected]
Betreff: st: mfx & postfile
Hello,
I am trying to run many probit regressions and post the marginal
effects/standard errors to a new file. Here's what I am (within a
loop) trying to do:
/****************************************/
postfile `temname' mex1 mex2 sex1 sex2 using myfile.dta, replace
probit y x1 x2
mfx
post `temname' $exp
postclose `temname'
/****************************************/
My question is: what should be in Sexp? mfx returns matrices
e(Xmfx_dydx) and e(Xmfx_se_dydx) with the marginal effects and
standard errors. I don't know how to access them in this context. For
example, if instead I was using
/***************/
regress y x1 x2
/***************/
then $exp would simply be
/***************/
global $exp (_b[x1]) (_b[x2]) (_se[x1]) (_se[x2])
/***************/
but with mfx (or margin) I can't access the marginal effects/std
errors so easily.
I could also use margins, as I am running Stata 11. Any help is much
appreciated.
Thanks,
Dimitri
*
* 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/
*
* 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/