gdd_compare: Compare Temperature-Development Models

View source: R/gdd_compare.R

gdd_compareR Documentation

Compare Temperature-Development Models

Description

Fits all candidate models (linear + nonlinear) per group and returns a comparison table with R-squared, RMSE, AIC, AICc, BIC, delta-AICc and the best model (smallest AICc). Useful for reporting model selection tables in publications.

Usage

gdd_compare(
  data,
  temp_col = NULL,
  duration_col = NULL,
  by = NULL,
  models = c("linear", "logan", "lactin", "briere1", "briere2", "wang"),
  start = NULL,
  conf_level = 0.95,
  min_n = 3,
  maxiter = 1000
)

Arguments

data, temp_col, duration_col, by

Same as in [gdd_calc()].

models

Character vector of candidate models; default is all six. "auto" is not allowed here (this function IS the comparison).

start, conf_level, min_n, maxiter

Same as in [gdd_calc()].

Value

A data.frame with columns: group, model, n, converged, k, R2, RMSE, AIC, AICc, BIC, note, delta_AICc, best.

Examples

f <- system.file("extdata", "gdd_example.csv", package = "insectecol")
gdd_compare(gdd_read(f), by = "stage")

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