Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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 <>
Subject   Re: st: How to get P Values for sargan and abond in ereturn
Date   Sun, 2 Sep 2012 12:49:38 +0200


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.


Buis, Maarten, L. (2007). Stata tip 53: Where did my p-values go? The
Stata Journal, 7(4), pp. 584–586.

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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index