| Type: | Package |
| Title: | Quantile Autoregressive Distributed Lag Unit Root Test |
| Version: | 1.0.0 |
| Description: | Implements the Quantile Autoregressive Distributed Lag (QADF) unit root test proposed by Koenker and Xiao (2004) <doi:10.1198/016214504000001114>. The test examines unit root behaviour across the conditional distribution of a time series using quantile regression, providing a richer characterisation of persistence than standard ADF tests. Critical values follow Hansen (1995) <doi:10.1017/S0266466600009713>. Lag order selection is supported via AIC, BIC, or the t-statistic sequential testing approach. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.2 |
| Depends: | R (≥ 3.5.0) |
| Imports: | stats, quantreg |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| URL: | https://github.com/muhammedalkhalaf/qadf |
| BugReports: | https://github.com/muhammedalkhalaf/qadf/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-03-17 01:45:18 UTC; acad_ |
| Author: | Muhammad Alkhalaf |
| Maintainer: | Muhammad Alkhalaf <muhammedalkhalaf@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-20 11:50:02 UTC |
Print and Summary Methods for qadf Objects
Description
Print and summary methods for objects of class "qadf" returned
by qadf.
Usage
## S3 method for class 'qadf'
print(x, digits = 4L, ...)
## S3 method for class 'qadf'
summary(object, ...)
Arguments
x |
An object of class |
digits |
Integer. Number of significant digits for display. |
... |
Further arguments (ignored). |
object |
An object of class |
Value
Invisibly returns the input object.
Examples
set.seed(1)
y <- cumsum(rnorm(80))
res <- qadf(y, tau = 0.5)
print(res)
summary(res)
Quantile ADF Unit Root Test
Description
Implements the Quantile Autoregressive Distributed Lag (QADF) unit root test of Koenker and Xiao (2004). The test examines unit root behaviour across quantiles of the conditional distribution of a time series using quantile regression.
Usage
qadf(x, tau = 0.5, model = "c", max_lags = 8, ic = "aic")
Arguments
x |
A numeric vector or univariate time series object. |
tau |
A numeric scalar specifying the quantile at which to estimate
the model. Must satisfy |
model |
A character string specifying the deterministic component.
|
max_lags |
A non-negative integer specifying the maximum number of
augmentation lags to consider. Default is |
ic |
A character string for the information criterion used to select
the optimal lag length. One of |
Details
The QADF test estimates the autoregressive parameter \hat\rho(\tau)
at quantile \tau via quantile regression on the ADF regression
equation. The t-statistic t_n(\tau) = (\hat\rho(\tau) - 1) / se
tests H_0: \rho(\tau) = 1 (unit root) against
H_1: \rho(\tau) < 1 (stationarity).
Critical values are from Table 1 of Hansen (1995), interpolated
linearly for quantiles between tabulated values. The model
"c" corresponds to a demeaned ADF regression; "ct"
adds a linear time trend.
Value
An object of class "qadf" with components:
- statistic
The QADF t-statistic
t_n(\tau).- coef_stat
The
U_n(\tau) = n(\hat\rho(\tau) - 1)statistic.- rho_tau
Quantile autoregressive coefficient
\hat\rho(\tau).- rho_ols
OLS autoregressive coefficient.
- alpha_tau
Quantile intercept
\hat\alpha_0(\tau).- delta2
Nuisance parameter
\hat\delta^2.- half_life
Half-life implied by
\hat\rho(\tau), in periods.- opt_lags
Selected lag order.
- nobs
Number of observations used.
- critical_values
Named numeric vector of critical values at 1%, 5%, and 10% from Hansen (1995).
- tau
The quantile used.
- model
The deterministic model used.
- ic
The information criterion used.
- varname
The name of the input series.
References
Koenker, R. and Xiao, Z. (2004). Unit Root Quantile Autoregression Inference. Journal of the American Statistical Association, 99(465), 775–787. doi:10.1198/016214504000001114
Hansen, B. E. (1995). Rethinking the Univariate Approach to Unit Root Tests: How to Use Covariates to Increase Power. Econometric Theory, 11(5), 1148–1171. doi:10.1017/S0266466600009713
Examples
set.seed(42)
y <- cumsum(rnorm(100))
result <- qadf(y, tau = 0.5, model = "c", max_lags = 4)
print(result)