Draws observations from the posterior predictive distribution over the fitted period and, if horizon is positive, forecasts beyond it. The forecast extends the latent process with fresh innovations for each posterior draw.

# S3 method for class 'cidm_fit'
predict(object, horizon = 0, seed = NULL, ...)

Arguments

object

An cidm_fit object from fit().

horizon

Integer. Number of time points to forecast.

seed

Optional integer seed for the Julia random number generator, used for the forecast. In-sample predictions are drawn when fitting.

...

Unused.

Value

A matrix with one row per posterior draw and one column per time point, covering the fitted period followed by the forecast horizon.

Details

Forecasting uses the Julia session in which the model was fitted.

Examples

if (FALSE) { # \dontrun{
forecasts <- predict(fitted, horizon = 14)
} # }