rank_models_by_treatment: Rank Models Within Each Treatment

View source: R/rank_models_by_treatment.R

rank_models_by_treatmentR Documentation

Rank Models Within Each Treatment

Description

Ranks fitted models within each treatment using performance metrics produced by compare_models_by_treatment().

Usage

rank_models_by_treatment(comparison)

Arguments

comparison

Output from compare_models_by_treatment().

Details

Rankings can be based on metrics such as:

  • R-squared (R²)

  • Root Mean Squared Error (RMSE)

  • Residual Sum of Squares (RSS)

  • Akaike Information Criterion (AIC)

  • Bayesian Information Criterion (BIC)

This function is useful for identifying the best-performing model within each treatment and for evaluating whether model performance varies among treatments.

Value

A data frame containing model rankings for each treatment and performance metric.

See Also

compare_models_by_treatment, best_model_by_treatment, model_win_frequency, rank_models

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
)

comparison <- compare_models_by_treatment(
  Groot = groot_fit,
  Gompertz = gompertz_fit
)

rank_models_by_treatment(
  comparison
)


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