Statalist


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

st: Save results from the simulation


From   "Supnithadnaporn, Anupit" <[email protected]>
To   statalist <[email protected]>
Subject   st: Save results from the simulation
Date   Sun, 26 Oct 2008 00:55:34 -0400 (EDT)

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/



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