Statalist The Stata Listserver


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

Re: estat hettest: Breusch-Pagan Test


From   "Michael S. Hanson" <mshanson@wesleyan.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: estat hettest: Breusch-Pagan Test
Date   Tue, 4 Apr 2006 00:30:12 -0400

On Apr 3, 2006, at 11:41 AM, Schaffer, Mark E wrote:

-ivhettest- also handles testing following -regress-. Does it agree with you or -hettest-?
Mark,

Thanks for the suggestion. Here are the results I get:

. ivhettest, nr2
OLS heteroskedasticity test(s) using levels of IVs only
Ho: Disturbance is homoskedastic
White/Koenker nR2 test statistic : 4.223 Chi-sq(3) P-value = 0.2383

. ivhettest, bpg
OLS heteroskedasticity test(s) using levels of IVs only
Ho: Disturbance is homoskedastic
Breusch-Pagan/Godfrey/Cook-Weisberg : 10.689 Chi-sq(3) P-value = 0.0135

That is, the first test (White/Koenker) reproduces the results I calculated (and that match Wooldridge) for the LM form of the test; the second test (Breusch-Pagan/Cook-Weisberg) reproduces the score form of the test that is also produced by -estat hettest-.


	use "http://fmwww.bc.edu/ec-p/data/wooldridge/HPRICE1";, clear

	// Reproduce B-P test results in Wooldridge (2006, p.281)
	reg lprice llotsize lsqrft bdrms
	predict uhat, resid
	gen uhatsq = uhat^2
	reg uhatsq llotsize lsqrft bdrms
	scalar LM = e(r2)*e(N)
	scalar pvalue = chi2tail(e(df_m),LM)
	disp "Breusch-Pagan test: LM = " LM ", p-value = " pvalue

The output from this code is:

	Breusch-Pagan test : LM = 4.2232485, p-value = .23834455

which matches the B-P test results as reported in Wooldridge (2006).
However, the -estat hettest- gives a very different answer:

	// Stata implementation of B-P test
	reg lprice llotsize lsqrft bdrms
	estat hettest, rhs

yields:

	Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
	         Ho: Constant variance
	         Variables: llotsize lsqrft bdrms
	
	         chi2(3)      =    10.69
	         Prob > chi2  =   0.0135
                                        -- Mike

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