deerlab.hccm

hccm(J, residual, mode='HC1')[source]

Heteroscedasticity Consistent Covariance Matrix (HCCM)

Computes the heteroscedasticity consistent covariance matrix (HCCM) of a given LSQ problem given by the Jacobian matrix and the residual vector of a least-squares problem. The HCCM are valid for both heteroscedasticit and homoscedasticit residual vectors.

Parameters:
JNxM-element ndarray

Jacobian matrix of the residual vector

residualN-element ndarray

Vector of residuals

modestring, optional

HCCM estimation method:

  • 'HC0' - White, 1980 [1]

  • 'HC1' - MacKinnon and White, 1985 [2]

  • 'HC2' - MacKinnon and White, 1985 [2]

  • 'HC3' - Davidson and MacKinnon, 1993 [3]

  • 'HC4' - Cribari-Neto, 2004 [4]

  • 'HC5' - Cribari-Neto, 2007 [5]

If not specified, it defaults to 'HC1'

Returns:
CMxM-element ndarray

Heteroscedasticity consistent covariance matrix

References

[1]

White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity. Econometrica, 48(4), 817-838 DOI: 10.2307/1912934

[2] (1,2)

MacKinnon and White, (1985). Some heteroskedasticity-consistent covariance matrix estimators with improved finite sample properties. Journal of Econometrics, 29 (1985), pp. 305-325. DOI: 10.1016/0304-4076(85)90158-7

[3]

Davidson and MacKinnon, (1993). Estimation and Inference in Econometrics Oxford University Press, New York.

[4]

Cribari-Neto, F. (2004). Asymptotic inference under heteroskedasticity of unknown form. Computational Statistics & Data Analysis, 45(1), 215-233 DOI: 10.1016/s0167-9473(02)00366-3

[5]

Cribari-Neto, F., Souza, T. C., & Vasconcellos, K. L. P. (2007). Inference under heteroskedasticity and leveraged data. Communications in Statistics – Theory and Methods, 36(10), 1877-1888. DOI: 10.1080/03610920601126589