Description Usage Arguments Examples
Fit a vector autoregressive model with lasso penalty. The VAR model is estimated using a multiresponse linear regression. The sparse VAR fits multiple uniresponse linear regressions with lasso penalty. mclapply from multicore can be used to fit the individual uniresponse linear regressions in parallel. Note that mclapply is not available for windows
1 2 3 |
y |
A matrix where each column represents an individual time series |
freq |
only used if the time series are periodic. freq is a vector of frequencies for each of the time series, as in 'ts(y, freq = ...)'. If the time series are not periodic, then this vector can be a vector of NA |
p |
the number of lags to include in the design matrix |
y.spec |
A binary matrix that can constrain the number of lagged predictor variables. If y.spec[i][j] = 0, the ith time series in y will not be regressed on the jth time series of y, or any of its lags. |
numcore |
number of cpu cores to use to parallelize this function |
alpha |
the elastic net mixing parameter, as defined in 'glmnet' |
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.