View source: R/ElasticNetVAR.R
ElasticNetVAR | R Documentation |
Estimation of a VAR using equation-by-equation LASSO, Ridge or Elastic Net regressions.
ElasticNetVAR(
x,
configuration = list(nlag = 1, nfolds = 10, loss = "mae", alpha = NULL, n_alpha = 10)
)
x |
zoo data matrix |
configuration |
Model configuration |
nlag |
Lag length |
nfolds |
N-fold cross validation |
loss |
Loss function |
alpha |
LASSO is alpha equal 1 and Ridge if alpha equal 0 |
n_alpha |
Creates n-equidistant alpha values |
Estimate VAR model
David Gabauer
Tibshirani, R., Bien, J., Friedman, J., Hastie, T., Simon, N., Taylor, J., & Tibshirani, R. J. (2012). Strong rules for discarding predictors in lasso‐type problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(2), 245-266.
Hoerl, A. E., & Kennard, R. W. (1970). Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1), 55-67.
Zou, H., & Hastie, T. (2005). Regularization and variable selection via the elastic net. Journal of the royal statistical society: series B (statistical methodology), 67(2), 301-320.
Gabauer, D., Gupta, R., Marfatia, H. A., & Miller, S. M. (2024). Estimating US housing price network connectedness: Evidence from dynamic Elastic Net, Lasso, and ridge vector autoregressive models. International Review of Economics & Finance, 89, 349-362.
data("dy2012")
fit = ElasticNetVAR(dy2012, configuration=list(nlag=1, alpha=1, nfolds=10, loss="mae"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.