R/plot_infection_histories.R
plot_infection_history_chains_indiv.RdPlots 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
)the infection-history chain returned by load_mcmc_chains, in long format
if not already discarded, discards rows with `samp_no <= burnin`
optional vector of individual IDs, as recorded in `inf_chain$i`, to plot
if TRUE, adds zero-valued entries for infection events that are absent from the sparse chain
A list containing the MCMC trace plot and posterior density plot.
plot_infection_history_chains_indiv
Other infection_history_plots:
calculate_infection_history_statistics(),
plot_antibody_data(),
plot_antibody_predictions(),
plot_cumulative_infection_histories(),
plot_estimated_antibody_model(),
plot_individual_number_infections(),
plot_infection_history_chains_time(),
plot_infection_history_posteriors(),
plot_model_fits(),
plot_total_number_infections()
if (FALSE) { # \dontrun{
data(example_inf_chain)
plot_infection_history_chains_indiv(example_inf_chain, 0, 1:10, FALSE)
} # }