init_cumulative_fit | R Documentation |
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,
backend = "rstan"
)
args |
List of stan arguments. |
samples |
Numeric, defaults to 50. Number of posterior samples. |
warmup |
Numeric, defaults to 50. Number of warmup samples. |
id |
A character string used to assign logging information on error.
Used by |
verbose |
Logical, should fitting progress be returned. Defaults to
|
backend |
Character string indicating the backend to use for fitting stan models. Supported arguments are "rstan" (default) or "cmdstanr". |
A stanfit object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.