plot_distribution_fits: Plot distribution fits

View source: R/plots.R

plot_distribution_fitsR Documentation

Plot distribution fits

Description

Plot predicted Ct distribution fits from model

Usage

plot_distribution_fits(
  chain,
  obs_dat,
  MODEL_FUNC,
  nsamps = 100,
  pos_only = TRUE
)

Arguments

chain

A dataframe containing the MCMC samples

obs_dat

A dataframe containing observed Ct values and time of sample collection. NULL by default.

MODEL_FUNC

Function that expects a vector of model parameters with names corresponding to the parameter control table and returns a single log posterior probability

nsamps

Number of samples. Defaults to 100.

pos_only

pos_only flag uses only Ct values below the limit of detection. Defaults to TRUE.

Value

Returns two stacked ggplots.

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

Other plots: plot_prob_infection(), predicted_distribution_fits()

Examples

 {
model_func_gp <- create_posterior_func(par_tab,example_ct_data,NULL,incidence_function,"model")
p_distribution_fit_gp <- plot_distribution_fits(chain_comb, example_ct_data, model_func_gp,100,pos_only=FALSE)

jameshay218/virosolver documentation built on April 17, 2025, 2:57 p.m.