statsmodels.stats.diagnostic.het_white

statsmodels.stats.diagnostic.het_white(resid, exog, interaction_terms=True)[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, by default, interaction terms are automatically included in the auxiliary regression.

interaction_termsbool, default True

Flag indicating whether to include interaction terms (x1*x2, x1*x3,…).

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).

References

[1]

Greene, William H. Econometric analysis. 5th Edition. Pearson Education, 2002.

[2]

Damodar N. Gujarati, Basic Econometrics, section 11.5. Pg 387.