Learn R Programming

shrinkTVPVAR (version 0.1.1)

forecast_shrinkTVPVAR: Draw from posterior predictive density of a fitted TVP-VAR-SV model

Description

forecast_shrinkTVPVAR draws from the posterior predictive distribution of a fitted TVP-VAR-SV model resulting from a call to shrinkTVPVAR.

Usage

forecast_shrinkTVPVAR(mod, n.ahead = 1)

Value

The value returned is a list object of class shrinkTVPVAR_forc containing the samples from the posterior predictive density.

Arguments

mod

an object of class shrinkTVPVAR, containing the fitted model.

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 newdata.

Author

Peter Knaus peter.knaus@wu.ac.at

See Also

Other prediction functions: fitted.shrinkTVPVAR()

Examples

Run this code
# \donttest{
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)
# }

Run the code above in your browser using DataLab