VARXForecastEval {BigVAR} | R Documentation |
Evaluate forecasts from a VAR or VARX with lag orders selected by AIC/BIC
Description
Evaluate forecasts from a VAR or VARX with lag orders selected by AIC/BIC
Usage
VARXForecastEval(
Y,
X,
p,
s,
T1,
T2,
IC,
h,
iterated = FALSE,
loss = "L2",
delta = 2.5
)
Arguments
Y |
a |
X |
a |
p |
maximum lag order for endogenous series |
s |
maximum lag order for exogenous series |
T1 |
start of forecast evaluation period. |
T2 |
end of forecast evaluation period |
IC |
specifies whether to select lag order according to 'AIC' or 'BIC' |
h |
desired forecast horizon |
iterated |
indicator as to whether to use iterated or direct multistep forecasts (if applicable, VAR context only) |
loss |
loss function (default 'L2', one of 'L1','L2','Huber') |
delta |
delta for Huber loss function (default 2.5) |
Details
This function evaluates the one-step ahead forecasts of a VAR or VARX fit by least squares over an evaluation period. At every point in time, lag orders for the endogenous and exogenous series are selected according to AIC or BIC. This function is run automatically when cv.BigVAR
is called unless ic
is set to FALSE
in constructModel
.
Value
Returns the one-step ahead MSFE as well as the forecasts over the evaluation period and lag order selected.
References
Neumaier, Arnold, and Tapio Schneider. 'Estimation of parameters and eigenmodes of multivariate autoregressive models.' ACM Transactions on Mathematical Software (TOMS) 27.1 (2001): 27-57.
See Also
VARXFit
,constructModel
, cv.BigVAR
Examples
data(Y)
# Evaluate the performance of a VAR with lags selected by BIC.
p <- 4
T1 <- floor(nrow(Y))/3
T2 <- floor(2*nrow(Y))/3
# Matrix of zeros for X
X <- matrix(0,nrow=nrow(Y),ncol=ncol(Y))
BICMSFE <- VARXForecastEval(Y,X,p,0,T1,T2,'BIC',1)