| predicted_distribution_fits | R Documentation |
Obtain predicted Ct distribution fits from model (posterior_dat)
predicted_distribution_fits(chain, MODEL_FUNC, nsamps = 100)
chain |
A dataframe containing the MCMC samples |
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. |
Returns a dataframe containing the predictions from the posterior distribution.
James Hay, jhay@hsph.harvard.edu
Other plots:
plot_distribution_fits(),
plot_prob_infection()
data(example_ct_data)
data(example_seir_partab)
## Not run:
MODEL_FUNC <- create_posterior_func(parTab=example_seir_partab,
data=example_ct_data,
PRIOR_FUNC=prior_func_seir,
INCIDENCE_FUNC=incidence_function,
use_pos=FALSE)
posterior_dat <- predicted_distribution_fits(chain, MODEL_FUNC, nsamps=100)
head(posterior_dat)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.