SuanShu, a Java numerical and statistical library



com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity
Class BreuschPagan

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.test.HypothesisTest
      extended by com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity.Heteroskedasticity
          extended by 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:

Field Summary
 
Fields inherited from class com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity.Heteroskedasticity
N, residuals
 
Constructor Summary
BreuschPagan(LMResiduals residuals, boolean studentized)
          Perform the Breusch-Pagan test to test for heteroskedasticity in a linear regression model.
 
Method Summary
 OLSRegression getAuxiliaryRegression()
          Define the transformation of residuals.
 double statistics()
          Get the test statistics.
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.regression.linear.heteroskedasticity.Heteroskedasticity
getAlternativeHypothesis, getAuxiliaryOLSRegression, getNullHypothesis, getX2, pValue
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreuschPagan

public BreuschPagan(LMResiduals 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 regression
studentized - true if to use Koenker's studentized version of the test statistic
Method Detail

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 © 2010-2014 Numerical Method Incorporation Limited. All Rights Reserved.