Skip to contents

sandwich_vcov() is deprecated and is not used by csdm() estimators. For an ordinary OLS model, use sandwich::vcovHC() instead. The function remains available temporarily so existing code can migrate.

Usage

sandwich_vcov(X, u, type = c("HC0", "HC1", "HC2", "HC3"))

Arguments

X

Numeric design matrix (n x k) used in OLS.

u

Numeric residual vector (length n).

type

Character; one of "HC0", "HC1", "HC2", "HC3".

Value

A k x k variance-covariance matrix.

Deprecation

This low-level matrix utility is not a covariance method for csdm_fit objects. Use vcov() to extract the supported mean-group covariance.