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 OLSRegressiongetAuxiliaryOLSRegression(Vector y, LMResiduals residuals)Get the auxiliary regression.protected OLSRegressiongetAuxiliaryRegression()Define the transformation of residuals.protected ChiSquareDistributiongetX2()Get the Chi-squared distribution.doublestatistics()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- theResidualsobject from an OLS regression
-
-
Method Detail
-
statistics
public double statistics()
Description copied from class:HypothesisTestGet the test statistics.- Overrides:
statisticsin classHeteroskedasticity- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
-
getX2
protected ChiSquareDistribution getX2()
Description copied from class:HeteroskedasticityGet the Chi-squared distribution.- Overrides:
getX2in classHeteroskedasticity- Returns:
- the Chi-squared distribution
-
getAuxiliaryRegression
protected OLSRegression getAuxiliaryRegression()
Description copied from class:HeteroskedasticityDefine the transformation of residuals.- Specified by:
getAuxiliaryRegressionin classHeteroskedasticity- Returns:
- an auxiliary regression
-
getAuxiliaryOLSRegression
protected OLSRegression getAuxiliaryOLSRegression(Vector y, LMResiduals residuals)
Description copied from class:HeteroskedasticityGet the auxiliary regression.- Overrides:
getAuxiliaryOLSRegressionin classHeteroskedasticity- Parameters:
y- the observationsresiduals- the residuals from a linear regression result- Returns:
- the auxiliary regression
-
-