Residual Bootstrap for the Vector Autoregressive Model Using Lasso Regularization
Source:R/RcppExports.R
RBootVARLasso.Rd
Residual Bootstrap for the Vector Autoregressive Model Using Lasso Regularization
Arguments
- data
Numeric matrix. The time series data with dimensions
t
byk
, wheret
is the number of observations andk
is the number of variables.- p
Integer. The order of the VAR model (number of lags).
- B
Integer. Number of bootstrap samples to generate.
- 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.
X: Numeric matrix. Original
X
Y: List of numeric matrices. Bootstrapped
Y
See also
Other Fitting Autoregressive Model Functions:
FitMLVARDynr()
,
FitMLVARMplus()
,
FitVARDynr()
,
FitVARLassoSearch()
,
FitVARLasso()
,
FitVARMplus()
,
FitVAROLS()
,
LambdaSeq()
,
ModelVARP1Dynr()
,
ModelVARP2Dynr()
,
OrigScale()
,
PBootVARExoLasso()
,
PBootVARExoOLS()
,
PBootVARLasso()
,
PBootVAROLS()
,
RBootVARExoLasso()
,
RBootVARExoOLS()
,
RBootVAROLS()
,
SearchVARLasso()
,
StdMat()
Examples
rb <- RBootVARLasso(
data = dat_p2,
p = 2,
B = 5,
n_lambdas = 10,
crit = "ebic",
max_iter = 1000,
tol = 1e-5
)
str(rb)
#> List of 4
#> $ est : num [1:3, 1:7] 0.79 1 1.067 0.342 0 ...
#> $ boot: num [1:5, 1:21] 1.28 1.32 1.1 1.51 1.16 ...
#> $ X : num [1:998, 1:7] 1 1 1 1 1 1 1 1 1 1 ...
#> $ Y :List of 5
#> ..$ : num [1:998, 1:3] 0.158 0.497 0.591 2.332 -0.44 ...
#> ..$ : num [1:998, 1:3] 0.624 2.284 0.341 -1.494 1.165 ...
#> ..$ : num [1:998, 1:3] 1.519 -0.337 0.43 1.218 1.419 ...
#> ..$ : num [1:998, 1:3] -0.385 2.08 1.167 1.428 0.888 ...
#> ..$ : num [1:998, 1:3] 2.997 0.728 -1.907 0.79 0.149 ...