Learn R Programming

qardlr (version 1.0.1)

qardl_bic_select: BIC-Based Lag Order Selection for QARDL

Description

Automatically selects optimal lag orders (p, q) for the QARDL model using the Bayesian Information Criterion (BIC) evaluated at the median quantile (tau = 0.5).

Usage

qardl_bic_select(y, X, pmax = 7L, qmax = 7L, constant = TRUE)

Value

A list containing:

p_opt

Optimal AR lag order

q_opt

Optimal distributed lag order

bic_grid

Matrix of BIC values (pmax x qmax)

bic_min

Minimum BIC value

Arguments

y

Numeric vector of dependent variable.

X

Matrix of covariates.

pmax

Integer. Maximum AR lag order to consider. Default is 7.

qmax

Integer. Maximum distributed lag order to consider. Default is 7.

constant

Logical. Include intercept. Default is TRUE.

Details

The BIC is computed using the Schwarz criterion at the median quantile: $$BIC(p, q) = \log(\hat{\sigma}^2_{\tau=0.5}) + \frac{k_{pq} \log(n)}{n}$$

where \(k_{pq}\) is the number of parameters (p AR terms + q*k impact terms + constant) and \(\hat{\sigma}^2\) is the estimated residual variance.

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

Examples

Run this code
data(qardl_sim)
y <- qardl_sim$y
X <- as.matrix(qardl_sim[, c("x1", "x2")])
bic_result <- qardl_bic_select(y, X, pmax = 5, qmax = 5)
print(bic_result$bic_grid)

Run the code above in your browser using DataLab