plot_residual_comparison: Compare Residuals Across Models

View source: R/plot_residual_comparison.R

plot_residual_comparisonR Documentation

Compare Residuals Across Models

Description

Displays residuals from multiple fitted models for a selected bottle.

Usage

plot_residual_comparison(..., head)

Arguments

...

Fitted model objects.

head

Head identifier.

Details

Residuals are calculated as:

Observed - Predicted

and can be used to evaluate:

  • Model bias

  • Systematic prediction errors

  • Heteroscedasticity

  • Relative model performance

Models with residuals that are randomly distributed around zero are generally preferred over models showing systematic patterns.

Value

A ggplot2 object.

See Also

plot_residuals, plot_model_comparison, compare_models, fit_groot, fit_gompertz

Examples


files <- example_data()

raw_data <- read_ankom(
  files$ankom
)

metadata <- read_metadata(
  files$metadata
)

gp <- process_ankom(
  raw_data,
  metadata,
  headspace_ml = 210,
  temperature_c = 39
)

groot_fit <- fit_groot(
  gp
)

gompertz_fit <- fit_gompertz(
  gp
)

plot_residual_comparison(
  Groot = groot_fit,
  Gompertz = gompertz_fit,
  head = 1
)


rumenGP documentation built on Oct. 2, 2026, 5:09 p.m.