powered by
Function to obtain h-step ahead direct forecast based on estimated VAR, VARX or VARMA model
directforecast(fit, model, h = 1)
Fitted sparse VAR, VARX or VARMA model.
Type of model that was estimated: VAR, VARX or VARMA.
Desired forecast horizon.
Vector of length k containing the h-step ahead forecasts for the k time series.
# NOT RUN { data(Y) VARfit <- sparseVAR(Y) # sparse VAR VARforecast <- directforecast(fit=VARfit, model="VAR", h=1) # }
Run the code above in your browser using DataLab