estimate_ardl_multi: Estimate ARDL(p1, p2) model

View source: R/oos_helpers.R

estimate_ardl_multiR Documentation

Estimate ARDL(p1, p2) model

Description

Fits an autoregressive distributed lag model for the horizon-h target, with p1 lags of y and p2 lags of additional regressors z (e.g., extracted factors).

Usage

estimate_ardl_multi(y, z, h, p)

Arguments

y

Numeric vector of the target variable.

z

Numeric matrix of additional regressors (e.g., factor estimates).

h

Positive integer; forecast horizon.

p

Integer vector of length 2: c(p1, p2) where p1 is the number of AR lags and p2 the number of z lags.

Value

Coefficient vector (intercept, AR lags, then z lags).

Examples

y <- rnorm(200)
z <- matrix(rnorm(200 * 3), 200, 3)
coefs <- estimate_ardl_multi(y, z, h = 1, p = c(1, 1))
coefs


sdim documentation built on July 15, 2026, 1:10 a.m.