Plots the MCMC trace and posterior density of the inferred total number of infections for selected individuals.

plot_infection_history_chains_indiv(
  inf_chain,
  burnin = 0,
  indivs = NULL,
  pad_chain = TRUE
)

Arguments

inf_chain

the infection-history chain returned by load_mcmc_chains, in long format

burnin

if not already discarded, discards rows with `samp_no <= burnin`

indivs

optional vector of individual IDs, as recorded in `inf_chain$i`, to plot

pad_chain

if TRUE, adds zero-valued entries for infection events that are absent from the sparse chain

Value

A list containing the MCMC trace plot and posterior density plot.

Examples

if (FALSE) { # \dontrun{
data(example_inf_chain)
plot_infection_history_chains_indiv(example_inf_chain, 0, 1:10, FALSE)
} # }