Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: mfx & postfile

From   Dimitri Szerman <>
Subject   st: mfx & postfile
Date   Mon, 8 Mar 2010 13:58:04 +0000

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

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

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index