linearmodels.asset_pricing.covariance.HeteroskedasticCovariance

class linearmodels.asset_pricing.covariance.HeteroskedasticCovariance(xe: ndarray[tuple[int, ...], dtype[float64]], *, jacobian: ndarray | None = None, inv_jacobian: ndarray | None = None, center: bool = True, debiased: bool = False, df: int = 0)[source]

Heteroskedasticity robust covariance estimator.

Parameters:
xe: ndarray[tuple[int, ...], dtype[float64]]

Scores/moment conditions, with shape (nobs, nmoments).

jacobian: ndarray | None = None

Jacobian, with shape (nmoments, nparams). One and only one of jacobian and inv_jacobian must be provided.

inv_jacobian: ndarray | None = None

Inverse jacobian. One and only one of jacobian and inv_jacobian must be provided.

center: bool = True

Flag indicating to center the scores when computing the covariance. The default is True.

debiased: bool = False

Flag indicating to use a debiased estimator. The default is False.

df: int = 0

Degree of freedom value to use if debiasing. The default is 0.

Raises:

ValueError – If both or neither of jacobian and inv_jacobian are provided.

Methods

Properties

config

Configuration of the covariance estimator.

cov

Compute parameter covariance.

inv_jacobian

Inverse Jacobian.

jacobian

The Jacobian.

s

Score/moment condition covariance.

square

Flag indicating if jacobian is square.