predict.mfbvar: Predict method for class 'mfbvar'

Description Usage Arguments Details Value Examples

View source: R/interface.R

Description

Method for predicting mfbvar objects.

Usage

1
2
## S3 method for class '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.

Details

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

Value

A tibble with columns:

variable

Name of variable

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:

lower

The (1-pred_bands)/2 lower quantiles of the predictive distributions

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:

fcst

MCMC samples from the predictive distributions

iter

Iteration indexes for the MCMC samples

Examples

1
2
3
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)

mfbvar documentation built on Feb. 10, 2021, 5:12 p.m.