Skip to contents

Load and compile the nowcasting model

Usage

enw_model(
  model,
  include,
  compile = TRUE,
  threads = FALSE,
  profile = FALSE,
  stanc_options = list("O1"),
  verbose = TRUE,
  ...
)

Arguments

model

A character string indicating the path to the model. If not supplied the package default model is used.

include

A character string specifying the path to any stan files to include in the model. If missing the package default is used.

compile

Logical, defaults to TRUE. Should the model be loaded and compiled using cmdstanr::cmdstan_model().

threads

Logical, defaults to FALSE. Should the model compile with support for multi-thread support in chain. Note that this requires the use of the threads_per_chain argument when model fitting using enw_sample(), and epinowcast().

profile

Logical, defaults to FALSE. Should the model be profiled? For more on profiling see the cmdstanr documentation. # nolint

stanc_options

A list of options to pass to the stanc_options of cmdstanr::cmdstan_model(). By default "01" is passed which specifies simple optimisations should be done by the prior to compilation.

verbose

Logical, defaults to TRUE. Should verbose messages be shown.

...

Additional arguments passed to cmdstanr::cmdstan_model().

Value

A cmdstanr model.

See also

Functions used for modelling enw_as_data_list(), enw_inits(), enw_obs_as_data_list(), enw_priors(), enw_sample()

Examples

if (FALSE) { # interactive()
mod <- enw_model()
}