Extracts posterior samples to use to initialise a full model fit. This may
be useful for certain data sets where the sampler gets stuck or cannot
easily be initialised. In
estimate_infections(), epinow() and
regional_epinow() this option can be engaged by setting
stan_opts(init_fit = <stanfit>).
This implementation is based on the approach taken in epidemia authored by James Scott.
Arguments
- fit
A
<stanfit>object.- current_inits
A function that returns a list of initial conditions (such as
create_initial_conditions()). Only used inexclude_listis specified.- exclude_list
A character vector of parameters to not initialise from the fit object, defaulting to
NULL.- samples
Numeric, defaults to 50. Number of posterior samples.