Produces and saves estimated posterior distributions for the antibody kinetics parameters

plot_posteriors_theta(
  chain,
  par_tab,
  burnin = 0,
  samples = 100,
  calculate_ess = TRUE,
  plot_corr = TRUE,
  save_plots = FALSE,
  plot_mcmc = TRUE,
  save_loc = ""
)

Arguments

chain

the full MCMC chain to generate titre trajectories from

par_tab

the table controlling the parameters in the MCMC chain

burnin

if not already discarded, discard burn in from chain (takes rows where samp_no > burnin)

samples

how many samples from the chain to take

calculate_ess

if TRUE, calculates the ESS for all free parameters

plot_corr

if TRUE, returns a pairwise correlation plot of free parameters

save_plots

if TRUE, directly saves the plots as svgs

plot_mcmc

if TRUE, plots the MCMC chain traces

save_loc

the full directory path of where to save plots

Value

a list of ggplot objects and a data frame of estimates

See also

Other theta_plots: plot_samples_distances()

Examples

if (FALSE) { data(example_theta_chain) data(example_par_tab) plot_posteriors_theta(example_theta_chain,example_par_tab,samples=100) }