plot_posteriors_theta: Plot inferred posteriors theta

View source: R/plots.R

plot_posteriors_thetaR Documentation

Plot inferred posteriors theta

Description

Produces and saves estimated posterior distributions for the antibody kinetics parameters

Usage

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 sampno > 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

## Not run: 
data(example_theta_chain)
data(example_par_tab)
plot_posteriors_theta(example_theta_chain,example_par_tab,samples=100)

## End(Not run)

seroanalytics/serosolver documentation built on April 24, 2023, 9:52 a.m.