[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: Simulation: return overidentifying statistics
From
John Antonakis <[email protected]>
To
[email protected]
Subject
Re: st: RE: Simulation: return overidentifying statistics
Date
Sat, 19 Sep 2009 16:22:42 +0200
Hi Martin:
On the button; as usual.
(I have to find creative ways to thank you for your elegant solutions).
Thanks much.
J.
____________________________________________________
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
____________________________________________________
On 19.09.2009 12:52, Martin Weiss wrote:
<>
If you do insist on a -program- to return the values:
**************
webuse docvisits, clear
//drop it beforehand
capt prog drop sim
//define the program
program define sim
version 10.1
syntax [, SAMplesize(integer 1000)]
//estimate
gmm (docvis - exp({xb:private chronic /*
*/ female income} + {b0})) in 1/`samplesize', /*
*/instruments(private chronic female age black/*
*/ hispanic) deriv(/xb = -1*exp({xb:} + {b0})) /*
*/deriv(/b0 = -1*exp({xb:} + {b0})) /*
*/twostep nolog
//test
estat overid
end
//for sample sizes from 100 to 4000
forv i=100(100)4000{
qui sim, sam(`i')
di in red _n(2) /*
*/"Returned Values for `i' obs"
ret li
}
**************
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.
*
* 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 |