Statalist


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

st: Re: Save results from the simulation


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Save results from the simulation
Date   Sun, 26 Oct 2008 10:17:43 +0100

As Maarten said, -simulate- is ususally the way to go. You could also look at -h postfile- and http://www.stata-journal.com/article.html?article=pr0036

HTH
Martin
_______________________
----- Original Message ----- From: "Supnithadnaporn, Anupit" <gtg065t@mail.gatech.edu>
To: "statalist" <statalist@hsphsun2.harvard.edu>
Sent: Sunday, October 26, 2008 5:55 AM
Subject: st: Save results from the simulation


Dear all

I am testing a simple simulation before using it with the real data.
In the program, there are some results that I would like to save.
Would anybody please give me some suggestions of how to do this,
especially when there are 2 values of chi2.

Thank you,
Anupit


-----Results needed to save-----
test a b
- chi2(  1)
- Prob > chi2

test a=b
- chi2(  1)
- Prob > chi2

mfx c
- dy/dx
- Std. Err.
- x

-----Program simlogit-----

program define simlogit, rclass
version 9.2
gen a = k*invnorm(uniform())+ m
gen b = j*invnorm(uniform())+ n
logit y a b
test a b
test a=b
mfx c
drop a b
end

simulate _b _se, reps(10) saving(simlogit1.dta, replace): simlogit, obs(100)



*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index