Sparse Estimation of the Vector AutoRegressive with Exogenous Variables X (VARX) Model
sparseVARX(Y, X, p = NULL, s = NULL, VARXpen = "HLag",
VARXlPhiseq = NULL, VARXPhigran = NULL, VARXlBseq = NULL,
VARXBgran = NULL, VARXalpha = 0, h = 1, cvcut = 0.9, eps = 10^-3)
A \(T\) by \(k\) matrix of time series. If k=1, a univariate autoregressive model is estimated.
A \(T\) by \(m\) matrix of time series.
User-specified maximum endogenous autoregressive lag order. Typical usage is to have the program compute its own maximum lag order based on the time series length.
User-specified maximum exogenous autoregressive lag order. 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 in VARX.
User-specified grid of values for regularization parameter corresponding to the endogenous autoregressive coefficients in the VARX. 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 corresponding to the endogenous autoregressive coefficients in the VARX: First element specifies how deep the grid should be constructed. Second element specifies how many values the grid should contain.
User-specified grid of values for regularization parameter corresponding to the exogenous autoregressive coefficients in the VARX. 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 corresponding to the exogenous autoregressive coefficients in the VARX: 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.
Desired forecast horizon in time-series cross-validation procedure.
Proportion of observations used for model estimation in the time series cross-validation procedure. The remainder is used for forecast evaluation.
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 endogenous time series.
\(T\) by \(m\) matrix of exogenous time series.
Number of endogenous time series.
Number of exogenous time series.
Maximum endogenous autoregressive lag order of the VARX.
Maximum exogenouss autoregressive lag order of the VARX.
Matrix of estimated endogenous autoregressive coefficients.
Matrix of estimated exogenous autoregressive coefficients.
vector of VARX intercepts.
# NOT RUN {
data(Y)
data(X)
VARXfit <- sparseVARX(Y=Y, X=X) # sparse VARX
y <- matrix(Y[,1], ncol=1)
ARXfit <- sparseVARX(Y=y, X=X) # sparse ARX
# }
Run the code above in your browser using DataLab