statsmodels.stats.sandwich_covariance.cov_white_simple#

statsmodels.stats.sandwich_covariance.cov_white_simple(results, use_correction=True)[source]#

heteroscedasticity robust covariance matrix (White)

Parameters:
resultsresult instance

result of a regression, uses results.model.exog and results.resid TODO: this should use wexog instead

use_correctionbool

If true (default), then a small sample correction factor is used.

Returns:
covndarray, (k_vars, k_vars)

heteroscedasticity robust covariance matrix for parameter estimates

See also

cov_hc1, cov_hc2, cov_hc3

heteroscedasticity robust covariance matrices with small sample corrections

Notes

This produces the same result as cov_hc0, and does not include any small sample correction.

verified (against LinearRegressionResults and Peterson)