Usage
varxfit(X, p, constant = TRUE, exogen = NULL, robust = FALSE, gamma = 0.25,
delta = 0.01, nc = 10, ns = 500, postpad = c("none", "constant", "zero", "NA"),
cluster = NULL)
varxfilter(X, p, Bcoef, exogen = NULL, postpad = c("none", "constant", "zero", "NA"))
varxforecast(X, Bcoef, p, out.sample, n.ahead, n.roll, mregfor)
varxsim (X, Bcoef, p, n.sim, n.start, prereturns, resids, mexsimdata)
Arguments
X
A multivariate data matrix.
p
The number of autoregressive lags.
constant
Whether to include a constant.
exogen
An optional matrix of exogenous regressors with as many rows as X, and
appropriately lagged.
Bcoef
A matrix of coefficients for the varxfilter function.
robust
Whether to use the robust version of VAR based on the multivariate Least
Trimmed Squares Estimator described in Croux and Joossens (2008).
gamma
Proportion to trim in the robust method.
delta
The critical value for Reweighted estimator for the robust method.
ns
The number of subsets to use for the robust method.
nc
The number of C-steps to use for the robust method.
postpad
(defaults to none) Whether to postpad the fitted/filtered values
(and hence calculation of residuals) with the estimated constant, zeros or NA's,
thus returning matrices of the same size as the input data (rather than input
data
cluster
A cluster object created by calling makeCluster
from
the parallel package. If it is not NULL, then this will be used for parallel
estimation in the case of the robust VAR version (remember to stop the cluster
on completion).
out.sample
The number of points kept for out of sample rolling forecast.
n.ahead
The forecast horizon.
n.roll
In combination with out.sample
, determines the number of times to roll
forward the n.ahead forecast using data left out of sample.
mregfor
Matrix of external regressor forecasts (with appropriate lag structure).
n.start
Simulation burn-in sample.
prereturns
Optionally supplied pre-return matrix with p lags to initialize
simulation.
resids
Matrix of randomly generated residuals of size n.sim+n.start.
mexsimdata
Matrix of external regressor pre-generated random values to use in the
simulation (if NULL then assumed zero).