statsmodels.stats.diagnostic.het_white

statsmodels.stats.diagnostic.het_white(resid, exog)[source]

White’s Lagrange Multiplier Test for Heteroscedasticity.

Parameters
residarray_like

The residuals. The squared residuals are used as the endogenous variable.

exogarray_like

The explanatory variables for the variance. Squares and interaction terms are automatically included in the auxiliary regression.

Returns
lmfloat

The lagrange multiplier statistic.

lm_pvalue :float

The p-value of lagrange multiplier test.

fvaluefloat

The f-statistic of the hypothesis that the error variance does not depend on x. This is an alternative test variant not the original LM test.

f_pvaluefloat

The p-value for the f-statistic.

Notes

Assumes x contains constant (for counting dof).

question: does f-statistic make sense? constant ?

References

Greene section 11.4.1 5th edition p. 222. Test statistic reproduces Greene 5th, example 11.3.