arch.unitroot.cointegration.DynamicOLS.fit¶
-
DynamicOLS.fit(cov_type: 'unadjusted' | 'homoskedastic' | 'robust' | 'kernel' =
'unadjusted'
, kernel: str ='bartlett'
, bandwidth: int | None =None
, force_int: bool =False
, df_adjust: bool =False
) DynamicOLSResults [source]¶ Estimate the Dynamic OLS regression
- Parameters:¶
- cov_type: 'unadjusted' | 'homoskedastic' | 'robust' | 'kernel' =
'unadjusted'
¶ Either “unadjusted” (or is equivalent “homoskedastic”) or “robust” (or its equivalent “kernel”).
- kernel: str =
'bartlett'
¶ The string name of any of any known kernel-based long-run covariance estimators. Common choices are “bartlett” for the Bartlett kernel (Newey-West), “parzen” for the Parzen kernel and “quadratic-spectral” for the Quadratic Spectral kernel.
- bandwidth: int | None =
None
¶ The bandwidth to use. If not provided, the optimal bandwidth is estimated from the data. Setting the bandwidth to 0 and using “unadjusted” produces the classic OLS covariance estimator. Setting the bandwidth to 0 and using “robust” produces White’s covariance estimator.
- force_int: bool =
False
¶ Whether the force the estimated optimal bandwidth to be an integer.
- df_adjust: bool =
False
¶ Whether the adjust the parameter covariance to account for the number of parameters estimated in the regression. If true, the parameter covariance estimator is multiplied by T/(T-k) where k is the number of regressors in the model.
- cov_type: 'unadjusted' | 'homoskedastic' | 'robust' | 'kernel' =
- Returns:¶
The estimation results.
- Return type:¶
See also
arch.unitroot.cointegration.engle_granger
Cointegration testing using the Engle-Granger methodology
statsmodels.regression.linear_model.OLS
Ordinal Least Squares regression.
Notes
When using the unadjusted covariance, the parameter covariance is estimated as
\[T^{-1} \hat{\sigma}^2_{HAC} \hat{\Sigma}_{ZZ}^{-1}\]where \(\hat{\sigma}^2_{HAC}\) is an estimator of the long-run variance of the regression error and \(\hat{\Sigma}_{ZZ}=T^{-1}Z'Z\). \(Z_t\) is a vector the includes all terms in the regression (i.e., deterministics, cross-sectional, leads and lags) When using the robust covariance, the parameter covariance is estimated as
\[T^{-1} \hat{\Sigma}_{ZZ}^{-1} \hat{S}_{HAC} \hat{\Sigma}_{ZZ}^{-1}\]where \(\hat{S}_{HAC}\) is a Heteroskedasticity-Autocorrelation Consistent estimator of the covariance of the regression scores \(Z_t\epsilon_t\).