sparseVAR {bigtime}  R Documentation 
Sparse Estimation of the Vector AutoRegressive (VAR) Model
sparseVAR(
Y,
p = NULL,
VARpen = "HLag",
VARlseq = NULL,
VARgran = NULL,
selection = c("none", "cv", "bic", "aic", "hq"),
cvcut = 0.9,
h = 1,
eps = 0.001,
check_std = TRUE
)
Y 
A 
p 
Userspecified maximum autoregressive lag order of the VAR. Typical usage is to have the program compute its own maximum lag order based on the time series length. 
VARpen 
"HLag" (hierarchical sparse penalty) or "L1" (standard lasso penalty) penalization. 
VARlseq 
Userspecified grid of values for regularization parameter corresponding to sparse penalty. Typical usage is to have the program compute its own grid. Supplying a grid of values overrides this. WARNING: use with care. 
VARgran 
Userspecified vector of granularity specifications for the penalty parameter grid: First element specifies how deep the grid should be constructed. Second element specifies how many values the grid should contain. 
selection 
One of "none" (default), "cv" (Time Series CrossValidation), "bic", "aic", "hq". Used to select the optimal penalization. 
cvcut 
Proportion of observations used for model estimation in the time series crossvalidation procedure. The remainder is used for forecast evaluation. Redundant if selection is not "cv". 
h 
Desired forecast horizon in timeseries crossvalidation procedure. 
eps 
a small positive numeric value giving the tolerance for convergence in the proximal gradient algorithm. 
check_std 
Check whether data is standardised. Default is TRUE and is not recommended to be changed 
A list with the following components
Y 

k 
Number of time series. 
p 
Maximum autoregressive lag order of the VAR. 
Phihat 
Matrix of estimated autoregressive coefficients of the VAR. 
phi0hat 
vector of VAR intercepts. 
series_names 
names of time series 
lambdas 
sparsity parameter grid 
MSFEcv 
MSFE crossvalidation scores for each value of the sparsity parameter in the considered grid 
MSFEcv_all 
MSFE crossvalidation full output 
lambda_opt 
Optimal value of the sparsity parameter as selected by the timeseries crossvalidation procedure 
lambda_SEopt 
Optimal value of the sparsity parameter as selected by the timeseries crossvalidation procedure and after applying the onestandarderror rule. This is the value used. 
h 
Forecast horizon h 
Nicholson William B., Wilms Ines, Bien Jacob and Matteson David S. (2020), “Highdimensional forecasting via interpretable vector autoregression”, Journal of Machine Learning Research, 21(166), 152.
data(var.example)
VARfit < sparseVAR(Y = scale(Y.var)) # sparse VAR
ARfit < sparseVAR(Y=scale(Y.var[,2])) # sparse AR