predicted_distribution_fits.Rd
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.
Other plots:
plot_distribution_fits()
,
plot_prob_infection()
James Hay, jhay@hsph.harvard.edu
data(example_ct_data)
data(example_seir_partab)
if (FALSE) {
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)
}