constructModel {BigVAR}R Documentation

Construct an object of class BigVAR

Description

Construct an object of class BigVAR

Usage

constructModel(Y, p, struct, gran, RVAR = FALSE, h = 1,
  cv = "Rolling", MN = FALSE, verbose = TRUE, IC = TRUE,
  VARX = list(), T1 = floor(nrow(Y)/3), T2 = floor(2 * nrow(Y)/3),
  ONESE = FALSE, ownlambdas = FALSE, alpha = as.double(NULL),
  recursive = FALSE, C = as.double(NULL), dates = as.character(NULL),
  intercept = TRUE, tol = 1e-04, window.size = 0,
  separate_lambdas = FALSE)

Arguments

Y

T \times k multivariate time series or Y T \times (k+m) endogenous and exogenous series, respectively

p

Predetermined maximal lag order (for modeled series)

struct

The choice of penalty structure (see details).

gran

vector of penalty parameter specifications.

RVAR

True or False: option to refit based upon the support selected using the Relaxed-VAR procedure

h

Desired forecast horizon

cv

Cross-validation approach, either "Rolling" for rolling cross-validation or "LOO" for leave-one-out cross-validation.

MN

Minnesota Prior Indicator

verbose

Verbose output while estimating

IC

True or False: whether to include AIC and BIC benchmarks

VARX

List containing VARX model specifications.

T1

Index of time series in which to start cross validation

T2

Index of times series in which to start forecast evaluation

ONESE

True or False: whether to use the "One Standard Error Heuristic"

ownlambdas

True or False: Indicator for user-supplied penalty parameters

alpha

grid of candidate parameters for the alpha in the Sparse Lag and Sparse Own/Other VARX-L

recursive

True or False: Indicator as to whether iterative multi-step predictions are desired in the VAR context if the forecast horizon is greater than 1

C

vector of coefficients to shrink toward a random walk (if MN is TRUE)

dates

optional vector of dates corresponding to Y

intercept

True or False: option to fit an intercept

tol

optimization tolerance (default 1e-4)

window.size

size of rolling window. If set to 0 an expanding window will be used.

@details The choices for "struct" are as follows

  • "Basic" (Basic VARX-L)

  • "Lag" (Lag Group VARX-L)

  • "SparseLag" (Lag Sparse Group VARX-L)

  • "OwnOther" (Own/Other Group VARX-L)

  • "SparseOO" (Own/Other Sparse Group VARX-L)

  • "EFX" (Endogenous First VARX-L)

  • "HVARC" (Componentwise HVAR)

  • "HVAROO" (Own/Other HVAR)

  • "HVARELEM" (Elementwise HVAR)

  • "Tapered" (Lag weighted Lasso VAR)

  • "BGR" (Bayesian Ridge Regression (cf. Banbura et al))

The first number in the vector "gran" specifies how deep to construct the penalty grid and the second specifies how many penalty parameters to use If ownlambas is set to TRUE, gran should contain the user-supplied penalty parameters.

VARX specifications consist of a list with entry k denoting the series that are to be modeled and entry s to denote the maximal lag order for exogenous series.

The argument alpha is ignored unless the structure choice is "SparseLag" or "Lag." By default "alpha" is set to NULL and will be initialized as 1/(k+1) in cv.BigVAR and BigVAR.est. Any user supplied values must be between 0 and 1.

separate_lambdas

indicator for separate penalty parameters for each time series (default FALSE)

Note

The specifications "Basic", "Lag," "SparseLag," "SparseOO," and "OwnOther" can accommodate both VAR and VARX models. EFX only applies to VARX models. "HVARC," "HVAROO," "HVARELEM," and "Tapered" can only be used with VAR models.

References

William B Nicholson, Jacob Bien, and David S Matteson. "High Dimensional Forecasting via Interpretable Vector Autoregression." arXiv preprint arXiv:1412.5250, 2016. William B. Nicholson, David S. Matteson, Jacob Bien,VARX-L: Structured regularization for large vector autoregressions with exogenous variables, International Journal of Forecasting, Volume 33, Issue 3, 2017, Pages 627-651, William B Nicholson, David S. Matteson, and Jacob Bien (2016), "BigVAR: Tools for Modeling Sparse High-Dimensional Multivariate Time Series" arxiv:1702.07094

Banbura, Marta, Domenico Giannone, and Lucrezia Reichlin. "Large Bayesian vector auto regressions." Journal of Applied Econometrics 25.1 (2010): 71-92.

See Also

cv.BigVAR,BigVAR.est

Examples

# VARX Example
# Create a Basic VARX-L with k=2, m=1, s=2, p=4
VARX=list()
VARX$k=2 # indicates that the first two series are modeled
VARX$s=2 # sets 2 as the maximal lag order for exogenous series
data(Y)
T1=floor(nrow(Y)/3)
T2=floor(2*nrow(Y)/3)
Model1=constructModel(Y,p=4,struct="Basic",gran=c(50,10),verbose=FALSE,VARX=VARX,T1=T1,T2=T2)

[Package BigVAR version 1.0.6 Index]