Learn R Programming

qardlr (version 1.0.1)

qardl_rolling: Rolling Window QARDL Estimation

Description

Performs rolling or recursive window QARDL estimation to assess parameter stability over time.

Usage

qardl_rolling(
  formula,
  data,
  tau = c(0.25, 0.5, 0.75),
  p = 1L,
  q = 1L,
  window = 0L,
  method = c("rolling", "recursive"),
  constant = TRUE
)

Value

An object of class "qardl_rolling" containing:

beta

3D array of long-run parameters (k x ntau x nwindows)

phi

3D array of AR parameters (p x ntau x nwindows)

gamma

3D array of impact parameters (k x ntau x nwindows)

rho

Matrix of ECM coefficients (nwindows x ntau)

wald_beta

Matrix of beta constancy Wald statistics

wald_phi

Matrix of phi constancy Wald statistics

wald_gamma

Matrix of gamma constancy Wald statistics

dates

Vector of end dates for each window

window

Window size used

method

Method used ("rolling" or "recursive")

tau

Vector of quantiles

Arguments

formula

A formula of the form y ~ x1 + x2 + ....

data

A data frame containing the variables.

tau

Numeric vector of quantiles. Default is c(0.25, 0.50, 0.75).

p

Integer. AR lag order. Default is 1.

q

Integer. Distributed lag order. Default is 1.

window

Integer. Rolling window size. If 0, uses 10% of sample size.

method

Character. Either "rolling" (fixed window) or "recursive" (expanding window). Default is "rolling".

constant

Logical. Include intercept. Default is TRUE.

Details

Rolling window estimation helps detect structural breaks and assess parameter stability. The function estimates QARDL models on successive windows of data and tracks how parameters evolve over time.

For method = "rolling", a fixed window of size window is used. For method = "recursive", the window expands from window to the full sample.

References

Cho, J.S., Kim, T.-H., & Shin, Y. (2015). Quantile cointegration in the autoregressive distributed-lag modeling framework. Journal of Econometrics, 188(1), 281-300. tools:::Rd_expr_doi("10.1016/j.jeconom.2015.01.003")

See Also

qardl, plot.qardl_rolling

Examples

Run this code
data(qardl_sim)

# Rolling estimation with 50-observation window
roll <- qardl_rolling(y ~ x1 + x2, data = qardl_sim,
                      tau = c(0.25, 0.50, 0.75), p = 2, q = 2, window = 50)
print(roll)

# Recursive estimation
recur <- qardl_rolling(y ~ x1 + x2, data = qardl_sim,
                       tau = c(0.50), p = 2, q = 2,
                       window = 50, method = "recursive")
print(recur)

Run the code above in your browser using DataLab