sparseVARX {bigtime}  R Documentation 
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,
selection = c("none", "cv", "bic", "aic", "hq"),
check_std = TRUE
)
Y 
A 
X 
A 
p 
Userspecified maximum endogenous autoregressive lag order. Typical usage is to have the program compute its own maximum lag order based on the time series length. 
s 
Userspecified maximum exogenous autoregressive lag order. Typical usage is to have the program compute its own maximum lag order based on the time series length. 
VARXpen 
"HLag" (hierarchical sparse penalty) or "L1" (standard lasso penalty) penalization in VARX. 
VARXlPhiseq 
Userspecified 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. 
VARXPhigran 
Userspecified 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. 
VARXlBseq 
Userspecified 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. 
VARXBgran 
Userspecified 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. 
VARXalpha 
a small positive regularization parameter value corresponding to squared Frobenius penalty. The default is zero. 
h 
Desired forecast horizon in timeseries crossvalidation procedure. 
cvcut 
Proportion of observations used for model estimation in the time series crossvalidation procedure. The remainder is used for forecast evaluation. 
eps 
a small positive numeric value giving the tolerance for convergence in the proximal gradient algorithm. 
selection 
Model selection method to be used. Default is none, which will return all values for all penalisations. 
check_std 
Check whether data is standardised. Default is TRUE and is not recommended to be changed 
A list with the following components
Y 

X 

k 
Number of endogenous time series. 
m 
Number of exogenous time series. 
p 
Maximum endogenous autoregressive lag order of the VARX. 
s 
Maximum exogenouss autoregressive lag order of the VARX. 
Phihat 
Matrix of estimated endogenous autoregressive coefficients. 
Bhat 
Matrix of estimated exogenous autoregressive coefficients. 
phi0hat 
vector of VARX intercepts. 
exogenous_series_names 
names of the exogenous time series 
endogenous_series_names 
names of the endogenous time series 
lambdaPhi 
sparsity parameter grid corresponding to endogenous autoregressive parameters 
lambdaB 
sparsity parameter grid corresponding to exogenous autoregressive parameters 
lambdaPhi_opt 
Optimal value of the sparsity parameter (corresponding to the endogenous autoregressive parameters) as selected by the timeseries crossvalidation procedure 
lambdaPhi_SEopt 
Optimal value of the sparsity parameter (corresponding to the endogenous autoregressive parameters) as selected by the timeseries crossvalidation procedure and after applying the onestandarderror rule 
lambdaB_opt 
Optimal value of the sparsity parameter (corresponding to the exogenous autoregressive parameters) as selected by the timeseries crossvalidation procedure 
lambdaB_SEopt 
Optimal value of the sparsity parameter (corresponding to the exogenous autoregressive parameters) as selected by the timeseries crossvalidation procedure and after applying the onestandarderror rule 
MSFEcv 
MSFE crossvalidation scores for each value in the twodimensional sparsity grid 
h 
Forecast horizon h 
Wilms Ines, Sumanta Basu, Bien Jacob and Matteson David S. (2017), “Interpretable vector autoregressions with exogenous time series”, NIPS 2017 Symposium on Interpretable Machine Learning, arXiv:1711.03623.
data(varx.example)
VARXfit < sparseVARX(Y=scale(Y.varx), X=scale(X.varx)) # sparse VARX
y < matrix(Y.varx[,1], ncol=1)
ARXfit < sparseVARX(Y=y, X=X.varx) # sparse ARX