Learn R Programming

mfbvar (version 0.5.6)

predict.mfbvar: Predict method for class mfbvar

Description

Method for predicting mfbvar objects.

Usage

# S3 method for mfbvar
predict(object, aggregate_fcst = TRUE, pred_bands = 0.8, ...)

Arguments

object

object of class mfbvar

aggregate_fcst

If forecasts of quarterly variables should be aggregated back to the quarterly frequency.

pred_bands

The level of the probability bands for the forecasts.

...

Currently not in use.

Value

A tibble with columns:

time

Time index

fcst_date

Date of forecast

If the argument pred_bands is given as a numeric value between 0 and 1, the returned tibble also includes columns:

median

The medians of the predictive distributions

upper

The (1+pred_bands)/2 upper quantiles of the predictive distributions

If pred_bands NULL or NA, the returned tibble also includes the columns:

iter

Iteration indexes for the MCMC samples

Details

Note that this requires that forecasts were made in the original mfbvar call.

Examples

Run this code
# NOT RUN {
prior_obj <- set_prior(Y = mf_usa, n_lags = 4, n_reps = 20, n_fcst = 4)
mod_minn <- estimate_mfbvar(prior_obj, prior = "minn")
predict(mod_minn)
# }

Run the code above in your browser using DataLab