predict.emergence: Quantiles of an Emergence-Period Projection

View source: R/emergence_methods.R

predict.emergenceR Documentation

Quantiles of an Emergence-Period Projection

Description

Returns the projected eclosion (or hatch) dates of arbitrary emergence quantiles.

Usage

## S3 method for class 'emergence'
predict(object, p, event = c("eclosion", "hatch"), ...)

Arguments

object

A "emergence" object returned by emergence_calc or emergence_analyze.

p

Optional numeric vector of quantiles (0-1). The default (missing p) returns the stored predictions of the original call.

event

"eclosion" (default) or "hatch": which event to date.

...

Further arguments (unused).

Value

A data.frame with columns p, days (fractional days after the survey date) and date.

Examples

d <- data.frame(stage = c("Pupa 2", "Pupa 1", "Prepupa"),
                count = c(3, 4, 3), days = c(12, 14, 16))
fit <- emergence_calc(d, survey_date = "2026-03-20",
                      pre_ovip = 3, egg_days = 10)
predict(fit)                     # the stored 16/50/84 predictions
predict(fit, c(0.25, 0.75))      # arbitrary eclosion quantiles
predict(fit, c(0.25, 0.75), event = "hatch")

insectecol documentation built on Oct. 5, 2026, 5:08 p.m.