### Monday, March 20, 2006

## RE: st: ivreset

Arne,

> -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Arne Risa Hole > Sent: 18 March 2006 11:43 > To: statalist@hsphsun2.harvard.edu > Subject: RE: st: ivreset > > Austin, Mark, > > Thank you both for your replies, rescaling the forecast did > the trick (sorry for the bad formatting of my code before, it > looked fine in my email programme). > > I understand the motivation behind the rescaling, but I'm > slightly concerned about the fact that it produces a > different test statistic compared to using the actual > forecast. Note that this is not the case when using the Reset > test following OLS - the test statistic is invariant to the > rescaling in this case. > > I would think that since the two approaches (rescaling/ no > rescaling) produce different results, the correct test > statistic is that using the actual forecast?

There are two different issues here. Rescaling is one, and it is, in some sense, a side issue. The problem is that sometimes the yhat has large-ish values, and the higher order polynomials of yhat that are included in the artificial regression can get so big that the regression fails for numerical precision reasons. Stata's own version of the reset test, -ovtest-, also does this rescaling. The test statistic is, of course, invariant in theory to the units used and hence to rescaling.

The other issue is the one you might have missed. As Austin pointed out, the IV version of the RESET test cannot use standard fitted values that would be generated by -predict- after estimation using -ivreg- or -ivreg2-. These are yhat=X*beta-hat, and the problem is that X includes some endogenous regressors.

As the help file for -ivreset- explains, there are two alternatives. One is to use reduced form predictions for yhat, i.e., regress y on all the exogenous variables (including the excluded instruments) and then use -predict-. The other is to get what Pesaran and Taylor call the "optimal forecast" of yhat. This is not yhat=X*beta-hat, but yhat=X-hat*beta-hat, where X-hat includes the reduced form predicted values of the endogenous regressors (rather than the actual values). The code that Austin kindly posted to Statalast implemented the latter.

Cheers, Mark

> Cheers > Arne > > On Mar 17 2006, Schaffer, Mark E wrote: > > > Austin, Arne, > > > > > -----Original Message----- > > > From: Austin Nichols [mailto:austinnichols@gmail.com] > > > Sent: 16 March 2006 23:30 > > > To: statalist@hsphsun2.harvard.edu > > > Subject: Re: st: ivreset > > > > > > -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: > > > > > > use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta > > > 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) ivreset > > > > > > Now, as to why > > > replace yhat = (yhat-r(min))/(r(max)-r(min)) I cannot > tell you, but > > > it's in ivreset.ado > > > > It's to rescale yhat so that when it's squared, cubed, etc., it > > doesn't get wildly out of scale relative to the other regressors. > > This can cause problems for the regression that includes > these terms. > > > > Cheers, > > Mark > > > > > > > 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 http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta > > > > > > > > > > * > > * 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/ > > > > * > * 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/ > >

* * 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/

Tag: statalist