Skip to contents

Provides a user friendly interface around package functionality to produce a nowcast from observed preprocessed data, a reference model, and a report model.

Usage

epinowcast(
  pobs,
  reference_effects = epinowcast::enw_formula(pobs$metareference[[1]]),
  report_effects = epinowcast::enw_formula(pobs$metareport[[1]]),
  priors = epinowcast::enw_priors(),
  distribution = "lognormal",
  model = epinowcast::enw_model(),
  as_data_list = epinowcast::enw_as_data_list,
  inits = epinowcast::enw_inits,
  fit = epinowcast::enw_sample,
  nowcast = TRUE,
  pp = FALSE,
  likelihood = TRUE,
  debug = FALSE,
  output_loglik = FALSE,
  ...
)

Arguments

pobs

Output from enw_preprocess_data().

reference_effects

A list of fixed and random design matrices defining the date of reference model. Defaults to enw_formula() which is an intercept only model.

report_effects

A list of fixed and random design matrices defining the date of reports model. Defaults to enw_formula() which is an intercept only model.

priors

DESCRIPTION.

distribution

Character string indicating the type of distribution to use for reference date effects. The default is to use a lognormal but other options available include: gamma distributed ("gamma").

model

A cmdstanr model object as loaded by enw_model().

as_data_list

PARAM_DESCRIPTION

inits

PARAM DESCRIPTION

fit

PARAM DESCRIPTION

nowcast

Logical, defaults to TRUE. Should a nowcast be made using posterior predictions of the unobserved future reported notifications.

pp

Logical, defaults to FALSE. Should posterior predictions be made for observed data. Useful for evaluating the performance of the model.

likelihood

Logical, defaults to TRUE. Should the likelihood be included in the model

debug

Logical, defaults to FALSE. Should within model debug information be returned.

output_loglik

Logical, defaults to FALSE. Should the log-likelihood be output. Disabling this will speed up fitting if evaluating the model fit is not required.

...

Additional arguments passed to enw_sample().

Value

OUTPUT_DESCRIPTION

See also

Other epinowcast: plot.epinowcast(), summary.epinowcast()