High-level control.
spim_control(
short_run,
n_chains,
deterministic = FALSE,
multiregion = FALSE,
rt = TRUE,
severity = FALSE,
simulate = FALSE,
demography = FALSE,
date_restart = NULL,
n_particles = 192,
n_mcmc = 1500,
burnin = 500,
workers = TRUE,
n_sample = 1000,
n_threads = NULL,
compiled_compare = FALSE,
adaptive_proposal = NULL,
mcmc_path = NULL,
verbose = TRUE
)
Logical, indicating if this is a debug run. This will use freer particles, mcmc steps and a small sample
The number of chains to run
Logical, indicating if the model to fit to data is run deterministically or stochastically
Logical, indicating if we are fitting multiple regions at once (in which case even the deterministic model may benefit from multithreading).
Logical, indicating if we are calculating Rt trajectories or not. Default is TRUE
Logical, indicating if we are outputting severity trajectories (e.g. IFR, IHR, HFR). Default to FALSE.
Logical, indicating if we are outputting a simulate object for onward simulation
Logical, indicating if we are outputting model demography - admissions and deaths by age
Optionally, dates save restart data in the pmcmc (see mcstate::pmcmc
number of particles to be used in particle filter if
short_run = FALSE
number of steps to be used in PMCMC if
short_run = FALSE
number of steps out of n_mcmc
to be used as a burn-in in
PMCMC if short_run = FALSE
Logical, indicating if we should enable workers. If
TRUE
, then a number of workers between 1 and 4 will be used
depending on n_chains
and the detected number of cores.
number of steps to retain (across all chains) if
short_run = FALSE
Explicit number of threads, overriding detection by spim_control_cores
Use a compiled compare function (rather than the R version). This can speed things up with the deterministic models in particular.
Control the adaptive proposal. By default
this is disabled (value of NULL
or FALSE
). This can only be
enabled for determinsitic models. Pass either TRUE
here or the
results from mcstate::adaptive_proposal_control()
Path to store the mcmc results in
Logical, indicating if we should print information about the parallel configuration
A list of options
TODO: document parallel detection