Class White
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
-
- dev.nm.stat.test.regression.linear.heteroskedasticity.White
-
public class White extends Heteroskedasticity
The White test tests for conditional heteroskedasticity. It is a chi-squared test: the test statistic is nχ2 with k degrees of freedom. If the White test shows that there is conditional heteroskedasticity, we can consider a GARCH model.- See Also:
- H. White, "A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity," Econometrica 48 (4): 817-838, MR575027 JSTOR 1912934, 1980.
- R. Koenker, "A Note on Studentizing a Test for Heteroskedasticity," Journal of Econometrics 17, 107-112, 1981.
- Wikipedia: White test
-
-
Field Summary
-
Fields inherited from class dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
N, residuals
-
-
Constructor Summary
Constructors Constructor Description White(LMResiduals residuals)
Perform the White test to test for heteroskedasticity in a linear regression model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OLSRegression
getAuxiliaryOLSRegression(Vector y, LMResiduals residuals)
Get the auxiliary regression.protected OLSRegression
getAuxiliaryRegression()
Define the transformation of residuals.protected ChiSquareDistribution
getX2()
Get the Chi-squared distribution.double
statistics()
Get the test statistics.-
Methods inherited from class dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
getAlternativeHypothesis, getNullHypothesis, pValue
-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Constructor Detail
-
White
public White(LMResiduals residuals)
Perform the White test to test for heteroskedasticity in a linear regression model.- Parameters:
residuals
- theResiduals
object from an OLS regression
-
-
Method Detail
-
statistics
public double statistics()
Description copied from class:HypothesisTest
Get the test statistics.- Overrides:
statistics
in classHeteroskedasticity
- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
-
getX2
protected ChiSquareDistribution getX2()
Description copied from class:Heteroskedasticity
Get the Chi-squared distribution.- Overrides:
getX2
in classHeteroskedasticity
- Returns:
- the Chi-squared distribution
-
getAuxiliaryRegression
protected OLSRegression getAuxiliaryRegression()
Description copied from class:Heteroskedasticity
Define the transformation of residuals.- Specified by:
getAuxiliaryRegression
in classHeteroskedasticity
- Returns:
- an auxiliary regression
-
getAuxiliaryOLSRegression
protected OLSRegression getAuxiliaryOLSRegression(Vector y, LMResiduals residuals)
Description copied from class:Heteroskedasticity
Get the auxiliary regression.- Overrides:
getAuxiliaryOLSRegression
in classHeteroskedasticity
- Parameters:
y
- the observationsresiduals
- the residuals from a linear regression result- Returns:
- the auxiliary regression
-
-