predict_biomass: Estimate biomass from a fitted allometric model

View source: R/predict_biomass.R

predict_biomassR Documentation

Estimate biomass from a fitted allometric model

Description

Wraps predict() for every kind of model full_estimation_table() can fit, and returns the biomass of a whole row on the scale of the supplied data

Usage

predict_biomass(model, size, abundance)

Arguments

model

A fitted allometric model

size

The size to estimate biomass for

abundance

The number of individuals the row holds

Details

Both kinds return a confidence interval, i.e. the uncertainty around the mean predicted biomass. The estimate is scaled to the abundance of the row while still on the scale the model was fitted on (log10 for an lm, the log link for a Poisson glm), and then back-transformed.

Value

Three values: the biomass estimate, its lower and its upper bound

Examples

# Any allometric model will do
mod <-
  lm(log10(biomass_col) ~ log10(size_col),
     data = data.frame(size_col = c(1, 2, 3, 4, 5),
                       biomass_col = c(0.1, 0.5, 1.2, 2.4, 4.1)))

# Biomass of a row holding ten individuals of size 3, with its bounds
predict_biomass(mod, size = 3, abundance = 10)

hellometry documentation built on Nov. 11, 2026, 5:06 p.m.