generate_configuration: Generate configuration.

Description Usage Arguments Examples

View source: R/generate_configuration.R

Description

This function generates a list of settings to be used as configuration in run_mcmc(). If nothing is supplied, default settings are returned.

Usage

1
2
3
generate_configuration(n_iter = NULL, n_burnin = NULL,
  set_seed = NULL, store_params = NULL, store_statuses = NULL,
  infer_covariate_effects = NULL)

Arguments

n_iter

total number of iterations including burnin. The default value is 30000.

n_burnin

number of interations in burnin. The default value is 10000 or one third of the supplied value for n_iter. During the burnin, the proposal widths are updated to optimise acceptance ratios. The chains returned by run_mcmc include the burnin.

set_seed

logical; if TRUE (default) a seed is set at the beginning of the MCMC iterations to ensure reproducibility of the chain.

store_params

if STORE_ALL (default) all iterations of the chains of the parameters are returned. If a number k is supplied, only every k-th iteration is stored. k = 1 is the same as STORE_ALL.

store_statuses

if STORE_ALL (default) for each patient and each iteration the colonisation time is returned. If a number k is supplied, only every k-th iteration is stored. If AGGREGATED only aggregated (total number of susceptible, acquired, imported) patient data is returned. k = 1 is the same as STORE_ALL.

infer_covariate_effects

if c("b","s","r") (default) covariate effects on transmissibility (b), susceptibility (s) and test sensitivity (r) are inferred. If NONE, no covariate effects are inferred and the values of b, s and r are set to 1. If a vector containing any of the covariate effects parameter b, s and r is supplied, effects on these parameters only are inferred and the remaining parameters are set to 1.

Examples

1
2
3
4
5
6
7
8
## use default configuration
generate_configuration()

## modify number of iterations
generate_configuration(n_iter = 1000, n_burnin = 300)

## infer effect of covariates on susceptibility only
generate_configuration(infer_covariate_effects = c("s"))

mirjamlaager/mrsamcmc documentation built on May 20, 2020, 11:13 a.m.