R/load_objects.R
load_theta_chains.RdSearches the given working directory for MCMC outputs from serosolver matching "_chain.csv", reads these in, subsets for burn in and thinning, and formats as both lists and a combined data frame.
load_theta_chains(
location = getwd(),
par_tab = NULL,
estimated_only = TRUE,
thin = 1,
burnin = 0,
convert_mcmc = TRUE,
verbose = TRUE
)Character string path to the directory containing the chain files. Defaults to `getwd()`.
Data frame; optional model control table used to select estimated parameters. Defaults to `NULL`.
if TRUE and `par_tab` is supplied, only returns parameters with `par_tab$fixed == 0`.
Integer; keeps every `thin`th saved MCMC sample. Defaults to `1` (no thinning).
Integer; discards samples with `samp_no <= burnin`. Defaults to `0`.
Logical; if TRUE, also converts the chains to `coda::mcmc` or `coda::mcmc.list` objects. Defaults to `TRUE`.
Logical; whether to print progress messages.
A list with two entries: `list`, containing the chains separately, and `chain`, containing the combined chains with a `chain_no` column. If `convert_mcmc = TRUE`, these entries are converted to `coda::mcmc.list` and `coda::mcmc` objects.
Other load_data_functions:
load_antibody_data(),
load_antigenic_map(),
load_infection_chains(),
load_mcmc_chains(),
load_start_tab()
if (FALSE) load_theta_chains(location="mcmc_chains", par_tab=par_tab, estimated_only=TRUE,thin=10,burnin=5000,convert_mcmc=TRUE) # \dontrun{}