Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Sargan pval in xtabond


From   Christopher F Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Sargan pval in xtabond
Date   Fri, 14 Nov 2003 07:15:26 -0500

On Nov 14, 2003, at 2:33 AM, Kai wrote:

After xtabond, the command "ereturn list" only returns among others the
Sargan test statistic, but not the probability. Is there a way to obtain
this probability as a e(.) result for further processing? What do I have
to include in the xtabond.ado?
Examining xtabond,

di as txt "Sargan test of over-identifying restrictions: ";
di as txt _col(10) "chi2(" as res e(zcols)-e(df_m) as txt ") = "
as res %8.2f e(sargan) _col(35) as txt "Prob > chi2 = "
as res %6.4f chiprob(e(zcols)-e(df_m),e(sargan)) ;

Just do the line

scalar sarganp = chiprob(e(zcols)-e(df_m),e(sargan))

after you run xtabond, and it will save the result as a scalar, which may be used in further calculations.

Kit

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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