plot_all_treatment_means: Plot Treatment Means for All Treatments

View source: R/plot_all_treatment_means.R

plot_all_treatment_meansR Documentation

Plot Treatment Means for All Treatments

Description

Compares observed and predicted treatment means across multiple fitted models.

Usage

plot_all_treatment_means(..., show_se = TRUE)

Arguments

...

Fitted model objects.

show_se

Logical. If TRUE, displays a standard-error ribbon around the observed treatment mean.

Details

The observed treatment mean is shown as a black line with optional standard-error bands. Predicted treatment means from each fitted model are overlaid for comparison.

This visualization is useful for evaluating model performance at the treatment level rather than at the individual bottle level.

Value

A ggplot2 object.

See Also

plot_treatment_mean, 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_all_treatment_means(
  Groot = groot_fit,
  Gompertz = gompertz_fit
)


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