Fit an EpiNow2 model
fit_model.RdFit an EpiNow2 model
Arguments
- data,
in the format returned by
read_data()- parameters
As returned from
read_disease_parameters()- seed
The random seed, used for both initialization by
EpiNow2in R and sampling in Stan- horizon
The number of days, as an integer, to forecast
- priors
A list of lists. The first level should contain the key
rtwith elementsmeanandsdand the keygpwith elementalpha_sd.- sampler_opts
A list. The Stan sampler options to be passed through EpiNow2. It has required keys:
cores,chains,iter_warmup,iter_sampling,max_treedepth, andadapt_delta.
Value
A fitted model object of class epinow or, if model fitting fails,
an NA is returned with a warning
See also
Other pipeline:
format_stan_opts(),
orchestrate_pipeline()