R/posterior_predict.R
    posterior_predict.epimodel.RdGenerate data from the posterior predictive distribution. This is useful for assessing the fit of a model. Alternatively this can be used for assessing counterfactuals or for prediction using the newdata argument.
# S3 method for epimodel posterior_predict( object, newdata = NULL, draws = NULL, types = NULL, seed = NULL, posterior_mean = FALSE, ... )
| object | A fitted model object returned by   | 
    
|---|---|
| newdata | If provided, the original   | 
    
| draws | Number of posterior draws to use. Defaults to the number of parameter draws in the fitted model.  | 
    
| types | A character vector specifying the names of the outcome variables to consider. If unspecified, uses all.  | 
    
| seed | An optional seed.  | 
    
| posterior_mean | If TRUE, return samples of posterior means rather than from the posterior predictive.  | 
    
| ... | Not used.  | 
    
A named list of draws from the posterior predictive. Each element corresponds to a specific outcome.