plot_distribution_fits | R Documentation |
Plot predicted Ct distribution fits from model
plot_distribution_fits(
chain,
obs_dat,
MODEL_FUNC,
nsamps = 100,
pos_only = TRUE
)
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. |
Returns two stacked ggplots.
James Hay, jhay@hsph.harvard.edu
Other plots:
plot_prob_infection()
,
predicted_distribution_fits()
{
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.