Obtain predicted Ct distribution fits from model (posterior_dat)

predicted_distribution_fits(chain, MODEL_FUNC, nsamps = 100)

Arguments

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.

Value

Returns a dataframe containing the predictions from the posterior distribution.

See also

Author

James Hay, jhay@hsph.harvard.edu

Examples

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)
}