
Create a function to draw from the meta model posterior predictive distribution
Source:R/meta_summaries.R
epidist_gen_meta_predict.RdIndividual level rows are predicted as in the marginal model using
epidist_gen_posterior_predict(). For summary rows the predicted quantity
is the reported summary itself, that is a simulated reported mean, standard
deviation, or, for quantile rows, cumulative probability at the reported
value. A row that stands for several summaries reported by one study
predicts the first of them, drawn from its marginal.
Predictions for summary rows are therefore not on the delay scale and
should not be compared directly with individual level predictions. They come
from the normal approximations described in as_epidist_meta_model(), so a
predicted cumulative probability for a quantile row can fall outside
[0, 1] when the study sample size is small.
Arguments
- family
A description of the response distribution and link function to be used in the model. Every family function has a link argument allowing users to specify the link function to be applied on the response variable. If not specified, default links are used. For details of all supported families see
brms::brmsfamily(). Commonly used, such asbrms::lognormal(), are also reexported as part ofepidist.
Value
A function that takes a prep argument from brms and returns a
matrix of posterior predictions.
See also
brms::posterior_predict() for details on how this is used within
brms.
Other gen:
epidist_gen_log_lik(),
epidist_gen_meta_log_lik(),
epidist_gen_posterior_epred(),
epidist_gen_posterior_predict()