Open SherryLeunglxy opened 2 years ago
The limiting distributions of t_n(τ) and QKS test are non-standard. In fact, they don't follow the conventional Dickey-Fuller distribution, but a convex combination of the Dickey-Fuller distribution and the standard normal, the mixture depending on the correlation between the equation error and the regression covariates. This asymptotic distribution is derived by BRUCE E. HANSEN (1995), aka the covariate augmented Dickey-Fuller (CADF). Unfortunately, I was unable to find a python implementation of CADF. I get my critical values is by mapping the sigma^2 to a table of critical values generated from the CADF. You can get the critical values by recreating the procedure from Hansen's original paper, but that's a lot of work.
In order to estimate it, I recommend you use the re-sampling procedure by Koenker and Xiao (2004) and approximate a small-sample distribution for the rho_tau (the same way I did it with QKS). You can use the CADF critical values to later validate your results.
That's for rho_tau. rho_ols on the other hand follows the t-distribution, so the calculation is straightforward. Running:
model = OLS(qADF.endog, qADF.exog).fit()
model.summary()
should do the trick.
Hello, Sir! After studying your code carefully, I would like to know if there is any way to get the p-value of rho_tau and rho_ols? Hope to your relpy, thanks!