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

White’s Lagrange Multiplier Test for Heteroscedasticity

  • resid (array_like) – residuals, square of it is used as endogenous variable
  • exog (array_like) – possible explanatory variables for variance, squares and interaction terms are included in the auxilliary regression.
  • resstore (instance (optional)) – a class instance that holds intermediate results. Only returned if store=True

  • lm (float) – lagrange multiplier statistic
  • lm_pvalue (float) – p-value of lagrange multiplier test
  • fvalue (float) – 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_pvalue (float) – p-value for the f-statistic


assumes x contains constant (for counting dof)

question: does f-statistic make sense? constant ?


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