Statalist


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

st: RE: Simulation: return overidentifying statistics


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Simulation: return overidentifying statistics
Date   Sat, 19 Sep 2009 11:28:58 +0200

<>

Turn these things into permanent objects if you do need them...


**************
webuse docvisits, clear
  
tempname hdle
tempfile info
postfile `hdle' samplesize p chi2 /*
*/ df using `info'  
  
            
foreach size in 100 1000 2000 3000 4000 `c(N)'{
	gmm (docvis - exp({xb:private chronic /*
	*/ female income} + {b0})) in 1/`size', /*
	*/instruments(private chronic female age black/*
	*/ hispanic) deriv(/xb = -1*exp({xb:} + {b0})) /*
	*/deriv(/b0 = -1*exp({xb:} + {b0})) twostep nolog
	estat overid
	post `hdle' (`size') /*
	*/ (r(J_p)) (r(J)) (r(J_df))
}


postclose `hdle'

preserve
	use `info', clear
	l, abbrev(12) noobs sep(0)
restore
**************


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of John Antonakis
Sent: Samstag, 19. September 2009 09:56
To: [email protected]
Subject: st: Simulation: return overidentifying statistics

Hi:

I would like to do a Monte Carlo to see how the Hansen J test behaves 
when varying sample size.

I can't figure out how to return and simulate the chi-square, df, and 
p-values for each run.

Best,
John.

-- 
____________________________________________________

Prof. John Antonakis
Associate Dean Faculty of Business and Economics
University of Lausanne
Internef #618
CH-1015 Lausanne-Dorigny
Switzerland

Tel ++41 (0)21 692-3438
Fax ++41 (0)21 692-3305

Faculty page:
http://www.hec.unil.ch/people/jantonakis&cl=en

Personal page:
http://www.hec.unil.ch/jantonakis
____________________________________________________

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index