powered by
mfbvar
Method for predicting mfbvar objects.
# S3 method for mfbvar predict(object, aggregate_fcst = TRUE, pred_bands = 0.8, ...)
object of class mfbvar
If forecasts of quarterly variables should be aggregated back to the quarterly frequency.
The level of the probability bands for the forecasts.
Currently not in use.
A tibble with columns:
tibble
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:
pred_bands
median
The medians of the predictive distributions
upper
The (1+pred_bands)/2 upper quantiles of the predictive distributions
(1+pred_bands)/2
If pred_bands NULL or NA, the returned tibble also includes the columns:
NULL
NA
iter
Iteration indexes for the MCMC samples
Note that this requires that forecasts were made in the original mfbvar call.
# 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