W3cubDocs

/Statsmodels

statsmodels.stats.diagnostic.het_white

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

White’s Lagrange Multiplier Test for Heteroscedasticity

Parameters:
  • 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
Returns:
  • 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

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 now test statistic reproduces Greene 5th, example 11.3

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.het_white.html