R/load_objects.R
load_mcmc_chains.RdReads in all MCMC chains for theta and infection histories from the specified directory matching files ending "_chain.csv", adding in the total number of infections.
load_mcmc_chains(
location = getwd(),
par_tab = NULL,
estimated_only = FALSE,
thin = 1,
burnin = 0,
convert_mcmc = FALSE,
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, only returns free model parameters (`par_tab$fixed == 0`) when `par_tab` is supplied. Defaults to `FALSE` for this wrapper.
Integer; keeps every `thin`th saved MCMC sample. Defaults to `1` (no thinning).
Integer; discards samples with `samp_no <= burnin`. Defaults to `0`.
if TRUE, converts the returned parameter chains to `coda::mcmc` objects. Defaults to `FALSE`.
Logical; whether to print progress messages.
A list with four entries: `theta_chain` and `inf_chain` contain the combined parameter and infection-history chains; `theta_list_chains` and `inf_list_chains` contain the corresponding chains separately. If `convert_mcmc = TRUE`, the parameter chains are converted to `coda::mcmc` objects; the infection-history chains remain data tables.
Other load_data_functions:
load_antibody_data(),
load_antigenic_map(),
load_infection_chains(),
load_start_tab(),
load_theta_chains()
if (FALSE) load_mcmc_chains(par_tab=par_tab, estimated_only=TRUE,thin=10,burnin=5000,convert_mcmc=TRUE) # \dontrun{}