# arch.unitroot.cointegration.DynamicOLS.fit¶

DynamicOLS.fit(cov_type='unadjusted', kernel='bartlett', bandwidth=None, force_int=False, df_adjust=False)[source]

Estimate the Dynamic OLS regression

Parameters
cov_typestr, default “unadjusted”

Either “unadjusted” (or is equivalent “homoskedastic”) or “robust” (or its equivalent “kernel”).

kernelstr, default “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.

bandwidthint, default 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_intbool, default False

Whether the force the estimated optimal bandwidth to be an integer.

df_adjustbool, default 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.

Returns
DynamicOLSResults

The estimation results.

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$$.

Return type

DynamicOLSResults