linearmodels.system.covariance.HeteroskedasticCovariance

class linearmodels.system.covariance.HeteroskedasticCovariance(x: list[TypeAliasForwardRef('numpy.ndarray')], eps: ndarray[tuple[int, ...], dtype[float64]], sigma: ndarray[tuple[int, ...], dtype[float64]], full_sigma: ndarray[tuple[int, ...], dtype[float64]], *, gls: bool = False, debiased: bool = False, constraints: TypeAliasForwardRef('linearmodels.system.model.LinearConstraint') | None = None)[source]

Heteroskedastic covariance estimation for system regression

Parameters:
x: list[TypeAliasForwardRef('numpy.ndarray')]

ndependent element list of regressor

eps: ndarray[tuple[int, ...], dtype[float64]]

Model residuals, ndependent by nobs

sigma: ndarray[tuple[int, ...], dtype[float64]]

Covariance matrix estimator of eps

gls: bool = False

Flag indicating to compute the GLS covariance estimator. If False, assume OLS was used

debiased: bool = False

Flag indicating to apply a small sample adjustment

constraints: TypeAliasForwardRef('linearmodels.system.model.LinearConstraint') | None = None

Constraints used in estimation, if any

Notes

If GLS is used, the covariance is estimated by

\[(X'\Omega^{-1}X)^{-1}\tilde{S}(X'\Omega^{-1}X)^{-1}\]

where X is a block diagonal matrix of exogenous variables and where \(\tilde{S}\) is a estimator of the model scores based on the model residuals and the weighted X matrix \(\Omega^{-1/2}X\).

When GLS is not used, the covariance is estimated by

\[(X'X)^{-1}\hat{S}(X'X)^{-1}\]

where \(\hat{S}\) is a estimator of the covariance of the model scores.

Methods

Properties

cov

Parameter covariance

cov_config

Optional configuration information used in covariance

sigma

Error covariance