forecast_shrinkTVPVAR {shrinkTVPVAR} | R Documentation |
forecast_shrinkTVPVAR
draws from the posterior predictive distribution of a fitted TVP-VAR-SV model resulting from a call to
shrinkTVPVAR
.
forecast_shrinkTVPVAR(mod, n.ahead = 1)
mod |
an object of class |
n.ahead |
a single, positive integer indicating the forecasting horizon, i.e. how many time-points into the future
the posterior predictive distribution should be sampled from. Can not be larger than the number of rows in |
The value returned is a list object of class shrinkTVPVAR_forc
containing the samples from the
posterior predictive density.
Peter Knaus peter.knaus@wu.ac.at
Other prediction functions:
fitted.shrinkTVPVAR()
set.seed(123)
sim <- simTVPVAR(p = 2)
data <- sim$data
res <- shrinkTVPVAR(data, p = 2)
forc <- forecast_shrinkTVPVAR(res, n.ahead = 4)
# Visualize forecast
plot(forc)