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

Re: st: How -ovtest- works?


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: How -ovtest- works?
Date   Wed, 09 Jun 2004 12:25:31 -0500

At 07:04 PM 6/9/2004 +0200, Andreas Kuhn wrote:

- ovtest - also includes the fourth power of yhat as a regressor. thus, including yhat^4 in your regression should give the same result as ovtest.
That is part of the problem, but not all. As the reference manual N-R points out, p. 381, the y-hat variable is normalized to have mean 0 and variance one before powers are taken. So, try this:

. sysuse auto

. quietly reg price mpg weight foreign

. predict y
(option xb assumed; fitted values)

. quietly sum y

. replace y = (y - r(mean))/r(sd)
(74 real changes made)

. gen y2 = y^2

. gen y3 = y^3

. gen y4 = y^4

. quietly reg price mpg weight foreign y2 y3 y4

. test y2 y3 y4

( 1) y2 = 0
( 2) y3 = 0
( 3) y4 = 0

F( 3, 67) = 15.31
Prob > F = 0.0000

.

*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index