find confidence envelopes by simulation

forecast_ensemble(
  fit,
  nsim = 200,
  forecast_args = fit$forecast_args,
  qvec = c(0.05, 0.5, 0.95),
  qnames = c("lwr", "value", "upr"),
  seed = NULL,
  imp_wts = FALSE,
  Sigma = bbmle::vcov(fit$mle2),
  scale_Sigma = 1,
  calc_Rt = FALSE,
  fix_pars_re = "nb_disp",
  raw_ensembles = FALSE,
  parallel = FALSE,
  n_cores = 4,
  .progress = if (interactive()) "text" else "none"
)

Arguments

fit

output from calibrate

nsim

number of simulations

forecast_args

arguments to pass to forecast_sim

qvec

vector of quantiles: NULL to return an array (nt x nvars x nsims) instead of a tibble with date/var+ quantiles

qnames

quantile names

seed

random-number seed

imp_wts

use importance weighting, i.e. weight ensemble based on log-likelihood?

Sigma

covariance matrix to pass to pop_pred_samp

scale_Sigma

multiplier for covariance matrix

calc_Rt

calculate and include R(t) in prediction/forecast?

fix_pars_re

a regular expression specifying the names of parameters that should be treated as fixed when constructing the parameter ensemble

raw_ensembles

(logical) return ensembles (FIXME: should implement return_type=c("array","quantiles","raw") (but not really raw, "dataframe"??))

parallel

whether to attempt parallel processing

n_cores

number of cores for parallel forecasting (ignored if not parallel) (??)

.progress

progress bar?