load_infection_chains: Load MCMC chains for infection histories

View source: R/analysis.R

load_infection_chainsR Documentation

Load MCMC chains for infection histories

Description

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

Usage

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

Arguments

location

defaults to current working directory. Where to look for MCMC chains? These are files ending in "_infection_histories.csv"

thin

thin the chains by every thin'th sample

burnin

discard the first burnin samples from the MCMC chain

chain_subset

if not NULL, a vector of indices to only load and store a subset of the chains detected. eg. chain_subset = 1:3 means that only the first 3 detected files will be processed.

Value

a list with a) a list of each chain as a data table separately; b) a combined data table, indexing each iteration by which chain it comes from

See Also

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

Examples

## Not run: load_infection_chains(thin=10,burnin=5000,chain_subset=1:3)

seroanalytics/serosolver documentation built on Dec. 14, 2024, 5:33 a.m.