Skip to contents

Predict reproductive probability using posterior predict (bernoulli model)

Usage

predict_repro_prob(newdata, draws, draw_id = 1)

Arguments

newdata

A data.frame with species and width columns.

draws

Posterior draws from posterior_coeffs_reproductive_probability.

draw_id

Integer index of the draw to use.

Value

Numeric vector of probabilities.

Examples

if (FALSE) { # \dontrun{
newdata <- expand.grid(species = levels(coralsize$species), width = seq(0,50,5))
newdata$reproductive_probability <- predict_repro_prob(newdata, posterior_coeffs_reproductive_probability, draw_id = 20)
} # }