linearmodels.iv.covariance.HomoskedasticCovariance¶
-
class linearmodels.iv.covariance.HomoskedasticCovariance(x: ndarray[Any, dtype[float64]], y: ndarray[Any, dtype[float64]], z: ndarray[Any, dtype[float64]], params: ndarray[Any, dtype[float64]], debiased: bool =
False
, kappa: int | float =1
)[source]¶ Covariance estimation for homoskedastic data
- Parameters:¶
- x: ndarray[Any, dtype[float64]]¶
Model regressors (nobs by nvar)
- y: ndarray[Any, dtype[float64]]¶
Series modeled (nobs by 1)
- z: ndarray[Any, dtype[float64]]¶
Instruments used for endogenous regressors (nobs by ninstr)
- params: ndarray[Any, dtype[float64]]¶
Estimated model parameters (nvar by 1)
- debiased: bool =
False
¶ Flag indicating whether to use a small-sample adjustment
- kappa: int | float =
1
¶ Value of kappa in k-class estimator
Notes
Covariance is estimated using
\[n^{-1} s^2 V^{-1}\]where
\[s^2 = n^{-1} \sum_{i=1}^n \hat{\epsilon}_i^2\]If
debiased
is true, then \(s^2\) 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.
Methods
Properties
Covariance of estimated parameters
Flag indicating if covariance is debiased
Score covariance estimate
Estimated variance of residuals.