Searches the given working directory for MCMC outputs from serosolver ending "infection_histories.csv", loads these in, subsets for burn in and thinning, and formats as both lists and a combined data table.

load_infection_chains(
  location = getwd(),
  thin = 1,
  burnin = 0,
  chain_subset = NULL,
  verbose = TRUE
)

Arguments

location

character string giving the directory containing the chain files. Defaults to the current working directory.

thin

integer; keeps every `thin`th saved MCMC sample. Defaults to 1.

burnin

integer; discards samples with `samp_no <= burnin`. Defaults to 0.

chain_subset

if not NULL, a vector of indices to only load and store a subset of the chains detected. For example, `chain_subset = 1:3` processes only the first three detected files.

verbose

logical; whether to print progress messages.

Value

A list with two entries: `list`, containing each infection-history chain separately, and `chain`, containing the combined chains with a `chain_no` column. These are data tables rather than `coda` objects.

See also

[load_mcmc_chains()], [load_start_tab()], [plot_infection_histories()]

Other load_data_functions: load_antibody_data(), load_antigenic_map(), load_mcmc_chains(), load_start_tab(), load_theta_chains()

Examples

if (FALSE) load_infection_chains(thin=10,burnin=5000,chain_subset=1:3) # \dontrun{}