Fits a model to cumulative cases. This may be a useful approach to initialising
a full model fit for certain data sets where the sampler gets stuck or cannot easily
be initialised as fitting to cumulative cases changes the shape of the posterior
distribution. In estimate_infections()
, epinow()
and regional_epinow()
this option can be
engaged by setting stan_opts(init_fit = "cumulative")
.
This implementation is based on the approach taken in epidemia authored by James Scott.
init_cumulative_fit(
args,
samples = 50,
warmup = 50,
id = "init",
verbose = FALSE
)
List of stan arguments
Numeric, defaults to 50. Number of posterior samples.
Numeric, defaults to 50. Number of warmup samples.
A character string used to assign logging information on error. Used by regional_epinow
to assign errors to regions. Alter the default to run with error catching.
Logical, should fitting progress be returned. Defaults to FALSE
.
A stanfit object