View source: R/compare_models_by_treatment.R
| compare_models_by_treatment | R Documentation |
Calculates model performance separately for each treatment.
compare_models_by_treatment(...)
... |
Fitted model objects. |
Performance metrics are computed using treatment-level predictions and observations, allowing direct comparison of competing models within each treatment.
Typical metrics include:
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 determining whether different treatments are best described by different kinetic models.
A data frame containing treatment-level performance metrics for each fitted model.
compare_models,
rank_models_by_treatment,
best_model_by_treatment,
model_win_frequency
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
)
compare_models_by_treatment(
Groot = groot_fit,
Gompertz = gompertz_fit
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.