View source: R/best_model_by_treatment.R
| best_model_by_treatment | R Documentation |
Returns the top-ranked model within each treatment.
best_model_by_treatment(ranked_comparison)
ranked_comparison |
Output from
|
Rankings are obtained from
rank_models_by_treatment() and are based on
model performance 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 provides a concise summary of the best-performing model for each treatment and is useful for identifying whether different treatments are best described by different kinetic models.
A data frame containing the highest-ranked model for each treatment.
compare_models_by_treatment,
rank_models_by_treatment,
model_win_frequency,
compare_models
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
)
ranking <- rank_models_by_treatment(
comparison
)
best_model_by_treatment(
ranking
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.