Sparse Estimation of the Vector AutoRegressive (VAR) Model
sparseVAR(Y, p = NULL, VARpen = "HLag", VARlseq = NULL, VARgran = NULL,
VARalpha = 0, cvcut = 0.9, h = 1, eps = 0.001)
A \(T\) by \(k\) matrix of time series. If k=1, a univariate autoregressive model is estimated.
User-specified 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.
"HLag" (hierarchical sparse penalty) or "L1" (standard lasso penalty) penalization.
User-specified 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.
User-specified 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.
a small positive regularization parameter value corresponding to squared Frobenius penalty. The default is zero.
Proportion of observations used for model estimation in the time series cross-validation procedure. The remainder is used for forecast evaluation.
Desired forecast horizon in time-series cross-validation procedure.
a small positive numeric value giving the tolerance for convergence in the proximal gradient algorithm.
A list with the following components
\(T\) by \(k\) matrix of time series.
Number of time series.
Maximum autoregressive lag order of the VAR.
Matrix of estimated autoregressive coefficients of the VAR.
vector of VAR intercepts.
Nicholson William B., Bien Jacob and Matteson David S. (2017), "High Dimensional Forecasting via Interpretable Vector Autoregression" arXiv preprint <arXiv:1412.5250v2>.
# NOT RUN {
data(Y)
VARfit <- sparseVAR(Y) # sparse VAR
y <- matrix(Y[,1], ncol=1)
ARfit <- sparseVAR(y) # sparse AR
# }
Run the code above in your browser using DataLab