com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity
Class BreuschPagan
java.lang.Object
com.numericalmethod.suanshu.stats.test.HypothesisTest
com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity.Heteroskedasticity
com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity.BreuschPagan
public class BreuschPagan
- extends Heteroskedasticity
The Breusch-Pagan test tests for conditional heteroskedasticity.
The test statistics is computed by regressing squared residuals from the original regression against the original regressors (plus intercept).
The test is a chi-squared test: the test statistic distribution is nχ2 with k degrees of freedom.
If the Breush-Pagan test shows that there is conditional heteroscedasticity,
it can be corrected by using the Hansen method, using robust standard errors, or re-thinking the regression equation.
The R equivalent function is bptest.
- See Also:
- T. S. Breusch and A. R. Pagan, "A simple test for heteroscedasticity and random coefficient variation," Econometrica 47 (5): 1287-1294, 1979.
- R. Koenker, "A Note on Studentizing a Test for Heteroscedasticity," Journal of Econometrics 17, 107-112, 1981.
- Wikipedia: Breusch-Pagan test
|
Constructor Summary |
BreuschPagan(Residuals residuals,
boolean studentized)
Perform the Breusch-Pagan test to test for heteroskedasticity in a linear regression model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BreuschPagan
public BreuschPagan(Residuals residuals,
boolean studentized)
- Perform the Breusch-Pagan test to test for heteroskedasticity in a linear regression model.
- Parameters:
residuals - the Residuals object from an OLS regressionstudentized - true if to use Koenker's studentized version of the test statistic
getAuxiliaryRegression
public OLSRegression getAuxiliaryRegression()
- Description copied from class:
Heteroskedasticity
- Define the transformation of residuals.
- Specified by:
getAuxiliaryRegression in class Heteroskedasticity
- Returns:
- an auxiliary regression
statistics
public double statistics()
- Description copied from class:
HypothesisTest
- Get the test statistics.
- Overrides:
statistics in class Heteroskedasticity
- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
Copyright © 2012 Numerical Method Inc. Ltd. All Rights Reserved.