Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ivreset

From   "Austin Nichols" <>
Subject   Re: st: ivreset
Date   Thu, 16 Mar 2006 18:30:26 -0500

-findit ivreset- then -help ivreset- when installed has a excellent
exposition that begins:

As Pagan and Hall (1983) and Pesaran and Taylor (1999) point out, a
RESET test for an IV regression cannot use the standard IV predicted
values X*beta-hat, because X includes endogenous regressors that are
correlated with u.

Try this code instead:

qui ivreg2 lw s expr tenure rns smsa (iq=med kww)
predict ytilde
mat b=e(b)
mat li b
qui regress iq s expr tenure rns smsa med kww
qui predict double xh
gen yhat=ytil-b[1,1]*iq+b[1,1]*xh
 sum yhat, meanonly
 qui replace yhat = (yhat-r(min))/(r(max)-r(min))
 qui gen double yhat2=yhat^2
qui ivreg2 lw s expr tenure rns smsa yhat2 (iq=med kww)
test yhat2
qui ivreg2 lw s expr tenure rns smsa (iq=med kww)

Now, as to why
 replace yhat = (yhat-r(min))/(r(max)-r(min))
I cannot tell you, but it's in ivreset.ado

On 16 Mar 2006 19:10:13 +0000, Arne Risa Hole wrote:
> I am using ivreset to do a Pesaran-Taylor Reset test after ivreg2. However,
> I am not able to replicate the result from ivreset manually. For example:
> use

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index