Parametric Bootstrap for the Vector Autoregressive Model Using Lasso Regularization
Source:R/RcppExports.R
PBootVARLasso.RdParametric Bootstrap for the Vector Autoregressive Model Using Lasso Regularization
Arguments
- data
Numeric matrix. The time series data with dimensions
tbyk, wheretis the number of observations andkis the number of variables.- 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 Lasso estimate of the coefficient matrix.
boot: Numeric matrix. Matrix of vectorized bootstrap estimates of the coefficient matrix.
See also
Other Fitting Autoregressive Model Functions:
FitMLVARDynr(),
FitMLVARMplus(),
FitVARDynr(),
FitVARLassoSearch(),
FitVARLasso(),
FitVARMplus(),
FitVAROLS(),
LambdaSeq(),
ModelVARP1Dynr(),
ModelVARP2Dynr(),
OrigScale(),
PBootVARExoLasso(),
PBootVARExoOLS(),
PBootVAROLS(),
RBootVARExoLasso(),
RBootVARExoOLS(),
RBootVARLasso(),
RBootVAROLS(),
SearchVARLasso(),
StdMat()
Examples
pb <- PBootVARLasso(
data = dat_p2,
p = 2,
B = 5,
burn_in = 20,
n_lambdas = 10,
crit = "ebic",
max_iter = 1000,
tol = 1e-5
)
str(pb)
#> List of 2
#> $ est : num [1:3, 1:7] 0.79 1 1.067 0.342 0 ...
#> $ boot: num [1:5, 1:21] 1.07 0.8 0.634 0.683 0.985 ...