forecast_shrinkTVPVAR {shrinkTVPVAR}R Documentation

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)

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.

Value

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

Author(s)

Peter Knaus peter.knaus@wu.ac.at

See Also

Other prediction functions: fitted.shrinkTVPVAR()

Examples


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)



[Package shrinkTVPVAR version 0.1.1 Index]