bayesnechurdlefitR/bayesnechurdlefit-methods.R
posterior_epred.bayesnechurdlefit.RdGenerates posterior predictions for a bayesnechurdlefit
# S3 method for class 'bayesnechurdlefit'
posterior_epred(
object,
which = "combined",
resolution = 1000,
x_range = NA,
newdata = NULL,
re_formula = NULL,
...
)An object of class bayesnechurdlefit.
Which curve to return: "combined" (the default),
"growth" or "survival".
The number of unique predictor values to predict over.
A range of predictor values to predict over.
An optional data.frame of predictor
values. When supplied, resolution and x_range are ignored.
Optional group-effects setting passed to both components.
Passed to each component posterior method, including
ndraws and draw_ids.
A matrix with draws as rows and predictor
values as columns.
The combined curve is the product of the growth curve and the
probability of survival, i.e. the expected response per individual
exposed. Draws are paired by row, which is valid because the two
posteriors are independent – see bnec_hurdle.
Without newdata, a group term spanning concentrations is predicted
for its observed levels and mixed by their observation counts. A level
observed at one concentration is excluded.