Skip to contents

This function uses a fitted brms model to generate posterior predictions of colony size (width), transforms width to area, and returns cumulative area predictions per species in long format.

Usage

posterior_coral_predict(
  brms,
  ndraws = 10000,
  seed = NULL,
  newdata,
  correct_species = FALSE
)

Arguments

brms

A fitted brms model predicting colony width.

ndraws

Integer. Number of posterior draws to sample.

newdata

A data frame containing the predictor variables for prediction.

correct_species

Logical. Whether to rename "Acropora cf. digitifera" to "Acropora digitifera" in predictions.

Value

A tibble with posterior draws in long format, including species, width, area, and cumulative area.