< >
I believe you will have to extract the desired elements from those
matrices and return them as scalars, e.g. within your program,
mfx
mat xmfxx = e(Xmfx_X)
ret scalar xmfxx1 = xmfxx[1,1]
ret scalar xmfxx2 = xmfxx[1,2]
eret clear
Something I did not know is that -simulate- will pick up everything in
r() if it has been changed but e() has not. Of course -logit- and -
mfx- change e(). That's why I include -eret clear- here. Then you can
just say
simulate, reps(`reps') nodots saving(simlogit1.dta, replace): simlogit
and it will pick up all the scalars that you have created in the
program.
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
On Oct 27, 2008, at 02:33 , Anupit wrote:
Here, I want to save the marginal effects of a and b after running the
logit for each repetition. I check the ereturn list and find that
these are
the matrices that I would like to save:
e(Xmfx_dydx)
e(Xmfx_se_dydx)
e(Xmfx_X)
However, I am a bit confused about how to save them.
1) Do I have to use them (e()) with -post-? If yes, how to declare
this within the -program-?
2) Are the new dataset saved by using -post- different from the one
saved by
- -saving- option of -simulation- command?
*
* 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/