Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: How to get P Values for sargan and abond in ereturn
From
daniel klein <[email protected]>
To
[email protected]
Subject
Re: st: How to get P Values for sargan and abond in ereturn
Date
Sun, 2 Sep 2012 12:49:38 +0200
Shan,
Buis (2007) shows how to do this. You already have the test statistic
for -sargan- stored in e(). All you need is the degrees of freedom,
which I guess should be e(zrank) - e(rank) -- I could be wrong here.
You can then calculate the p-value as
sca psargan = chi2tail(e(zrank) - e(rank), e(sargan))
Next you put the scalar into e(), using -estadd-, part of -estout- (Jann, SSC)
estadd sca psargan = psargan
You then add scalar e(psargan) to your estimation results, using
-esttab-, also part of -estout- (Jann, SSC).
esttab <whatever> ,sca(psargan)
You migth want to use a temporary name for the scalar, or a -local- instead.
Best
Daniel
Buis, Maarten, L. (2007). Stata tip 53: Where did my p-values go? The
Stata Journal, 7(4), pp. 584–586.
(http://www.stata-journal.com/sjpdf.html?articlenum=st0137)
--
I am running a panel data regression using xtdpdsys. After running the
regression, I perform estat sargan and estat abond and I can see both
the test statistic values and p-values for them in the log window.
However, I would like to get the p-values from ereturn list for these
tests so that I can put these p-values at the end of the regression
table using esttab. The ereturn list gives me only the test
statistics - e(sargan) and e(arm2) but not the p-values for them.
Could anybody help me with that please?
Thank you in advance. Shan
*
* 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/