linearmodels.iv.covariance.HeteroskedasticCovariance¶
- class HeteroskedasticCovariance(x, y, z, params, debiased=False, kappa=1)[source]¶
Covariance estimation for heteroskedastic data
- Parameters
- x
ndarray
Model regressors (nobs by nvar)
- y
ndarray
Series ,modeled (nobs by 1)
- z
ndarray
Instruments used for endogenous regressors (nobs by ninstr)
- params
ndarray
Estimated model parameters (nvar by 1)
- debiasedbool
Flag indicating whether to use a small-sample adjustment
- kappa
float
Value of kappa in k-class estimator
- x
Notes
Covariance is estimated using
\[n^{-1} V^{-1} \hat{S} V^{-1}\]where
\[\hat{S} = n^{-1} \sum_{i=1}^n \hat{\epsilon}_i^2 \hat{x}_i^{\prime} \hat{x}_i\]where \(\hat{\gamma}=(Z'Z)^{-1}(Z'X)\) and \(\hat{x}_i = z_i\hat{\gamma}\). If
debiased
is true, then \(S\) is scaled by n / (n-k).\[V = n^{-1} X'Z(Z'Z)^{-1}Z'X\]where \(X\) is the matrix of variables included in the model and \(Z\) is the matrix of instruments, including exogenous regressors.
- Attributes
Methods
Properties
Covariance of estimated parameters
Flag indicating if covariance is debiased
Heteroskedasticity-robust score covariance estimate
Estimated variance of residuals.