Learn R Programming

bigtime (version 0.1.0)

sparseVAR: Sparse Estimation of the Vector AutoRegressive (VAR) Model

Description

Sparse Estimation of the Vector AutoRegressive (VAR) Model

Usage

sparseVAR(Y, p = NULL, VARpen = "HLag", VARlseq = NULL, VARgran = NULL,
  VARalpha = 0, cvcut = 0.9, h = 1, eps = 0.001)

Arguments

Y

A \(T\) by \(k\) matrix of time series. If k=1, a univariate autoregressive model is estimated.

p

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.

VARpen

"HLag" (hierarchical sparse penalty) or "L1" (standard lasso penalty) penalization.

VARlseq

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.

VARgran

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.

VARalpha

a small positive regularization parameter value corresponding to squared Frobenius penalty. The default is zero.

cvcut

Proportion of observations used for model estimation in the time series cross-validation procedure. The remainder is used for forecast evaluation.

h

Desired forecast horizon in time-series cross-validation procedure.

eps

a small positive numeric value giving the tolerance for convergence in the proximal gradient algorithm.

Value

A list with the following components

Y

\(T\) by \(k\) matrix of time series.

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.

References

Nicholson William B., Bien Jacob and Matteson David S. (2017), "High Dimensional Forecasting via Interpretable Vector Autoregression" arXiv preprint <arXiv:1412.5250v2>.

See Also

lagmatrix and directforecast

Examples

Run this code
# 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