Class HarveyGodfrey
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
-
- dev.nm.stat.test.regression.linear.heteroskedasticity.HarveyGodfrey
-
public class HarveyGodfrey extends Heteroskedasticity
The Harvey-Godfrey test tests for conditional heteroskedasticity. The test statistics is computed by regressing log of 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.
-
-
Field Summary
-
Fields inherited from class dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
N, residuals
-
-
Constructor Summary
Constructors Constructor Description HarveyGodfrey(LMResiduals residuals)
Perform the Harvey-Godfrey test to test for heteroskedasticity in a linear regression model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OLSRegression
getAuxiliaryRegression()
Define the transformation of residuals.-
Methods inherited from class dev.nm.stat.test.regression.linear.heteroskedasticity.Heteroskedasticity
getAlternativeHypothesis, getAuxiliaryOLSRegression, getNullHypothesis, getX2, pValue, statistics
-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Constructor Detail
-
HarveyGodfrey
public HarveyGodfrey(LMResiduals residuals)
Perform the Harvey-Godfrey test to test for heteroskedasticity in a linear regression model.- Parameters:
residuals
- theResiduals
object from an OLS regression
-
-
Method Detail
-
getAuxiliaryRegression
public OLSRegression getAuxiliaryRegression()
Description copied from class:Heteroskedasticity
Define the transformation of residuals.- Specified by:
getAuxiliaryRegression
in classHeteroskedasticity
- Returns:
- an auxiliary regression
-
-