Skip to contents

Parametric Bootstrap for the Vector Autoregressive Model with Exogenous Variables Using Lasso Regularization

Usage

PBootVARExoLasso(data, exo_mat, p, B, burn_in, n_lambdas, crit, max_iter, tol)

Arguments

data

Numeric matrix. The time series data with dimensions t by k, where t is the number of observations and k is the number of variables.

exo_mat

Numeric matrix. Matrix of exogenous variables with dimensions t + burn_in by m. If the number of rows is equal to t, set burn_in = 0.

p

Integer. The order of the VAR model (number of lags).

B

Integer. Number of bootstrap samples to generate.

burn_in

Integer. Number of burn-in observations to exclude before returning the results in the simulation step.

n_lambdas

Integer. Number of lambdas to generate.

crit

Character string. Information criteria to use. Valid values include "aic", "bic", and "ebic".

max_iter

Integer. The maximum number of iterations for the coordinate descent algorithm (e.g., max_iter = 10000).

tol

Numeric. Convergence tolerance. The algorithm stops when the change in coefficients between iterations is below this tolerance (e.g., tol = 1e-5).

Value

List with the following elements:

  • est: Numeric matrix. Original OLS estimate of the coefficient matrix.

  • boot: Numeric matrix. Matrix of vectorized bootstrap estimates of the coefficient matrix.

Author

Ivan Jacob Agaloos Pesigan

Examples

data <- dat_p2_exo$data
exo_mat <- dat_p2_exo$exo_mat
pb <- PBootVARExoLasso(
  data = data,
  exo_mat = exo_mat,
  p = 2,
  B = 5,
  burn_in = 0,
  n_lambdas = 10,
  crit = "ebic",
  max_iter = 1000,
  tol = 1e-5
)
str(pb)
#> List of 2
#>  $ est : num [1:3, 1:10] 1.1645 0.6747 1.1333 0.358 0.0194 ...
#>  $ boot: num [1:5, 1:30] 1.23 1.06 1.16 1.55 1.07 ...