| Title: | Drying Kinetic Models Comparison and Analysis |
|---|---|
| Description: | Fits multiple thin-layer drying kinetic models to experimental moisture ratio data, compares model performance using statistical criteria, performs residual diagnostics, identifies the best-fitting model, and exports results to Word documents. Twenty models from Ertekin and Firat (2017) <doi:10.1016/j.jfoodeng.2016.09.030> are fitted using the Levenberg-Marquardt algorithm described in Marquardt (1963) <doi:10.1137/0111030>. |
| Authors: | Joshy C G [aut, cre], Devika S [aut] |
| Maintainer: | Joshy C G <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-07-21 14:48:06 UTC |
| Source: | https://github.com/cran/dryingkineticmodels |
Fits multiple thin-layer drying kinetic models to experimental moisture ratio data, compares model performance using statistical criteria, performs residual diagnostics, identifies the best-fitting model, and exports results to Word documents. Twenty models from Ertekin and Firat (2017) doi:10.1016/j.jfoodeng.2016.09.030 are fitted using the Levenberg-Marquardt algorithm described in Marquardt (1963) doi:10.1137/0111030.
Maintainer: Joshy C G [email protected]
Authors:
Devika S [email protected]
Fits 20 thin-layer drying kinetic models to experimental moisture
ratio data, ranks them by a composite goodness-of-fit criterion
(R, RMSE, and ), identifies the best model,
predicts moisture ratio (MR) using the best model,
performs residual diagnostic tests, and exports a fully formatted
report to a Word document.
dryingkineticmodels( file_path, verbose = FALSE, models = NULL, export_word = FALSE )dryingkineticmodels( file_path, verbose = FALSE, models = NULL, export_word = FALSE )
file_path |
Either a character string giving the path to an
|
verbose |
Logical. If |
models |
Optional character vector naming which of the 20
models to fit (see Details for valid names). If |
export_word |
Logical. If |
The function expects the input to have at least two numeric columns. The first numeric column is treated as drying time as 'time' and the second as moisture ratio as 'MR'. Reorder your columns in Excel if needed before calling the function.
The 20 models fitted are: Lewis, Page, Modified Page,
Henderson & Pabis, Logarithmic, Two-Term, Two-Term Exponential,
Diffusion Approximation, Wang & Singh, Midilli-Kucuk,
Modified Henderson & Pabis, Verma, Weibull, Aghbashlo et al.,
Jena & Das, Hii et al., Parabolic, Thompson, Demir et al., and
Thin-Layer Exponential-Linear. The corresponding names to use with
the models argument are "Lewis", "Page",
"Modified_Page", "Henderson_Pabis",
"Logarithmic", "Two_Term",
"Two_Term_Exponential", "Diffusion_Approximation",
"Wang_Singh", "Midilli_Kucuk",
"Modified_Henderson_Pabis", "Verma", "Weibull",
"Aghbashlo", "Jena_Das", "Hii_et_al",
"Parabolic", "Thompson", "Demir_et_al", and
"Thin_Layer_ExpLin".
Starting values are obtained via a coarse grid search using
nlsLM, making the fitting robust across
a wide range of datasets without requiring manual starting value
specification.
Goodness-of-fit statistics reported are R, RMSE, MAE,
, and RSS. Model ranking uses the combined rank of
R, RMSE, and following Goyal et al. (2007).
Residual diagnostics include the Shapiro-Wilk test (normality), Durbin-Watson test (autocorrelation), Breusch-Pagan test (homoscedasticity), and Runs test (randomness).
A list (returned invisibly) with five elements:
Data frame of all model fit statistics, sorted by composite rank.
The result list for the best-fitting model.
ANOVA table for the best model.
Data frame containing observed time, observed MR, predicted MR, residuals, and 95\ the best-fitting model.
Data frame recording which input columns were
used as TIME and MR. Always check this to confirm correct
column selection, especially when verbose = FALSE.
Goyal, R. K., Kingsly, A. R. P., Manikantan, M. R., & Ilyas, S. M. (2007). Mathematical modelling of thin layer drying kinetics of plum in a tunnel dryer. Journal of Food Engineering, 79(1), 176–180. doi:10.1016/j.jfoodeng.2006.01.041
# Small, fast toy example (runs automatically during R CMD check) toy_df <- data.frame( time = c(0, 30, 60, 90, 120, 150), MR = c(1.00, 0.72, 0.51, 0.36, 0.26, 0.18) ) toy_result <- dryingkineticmodels(toy_df, models = c("Lewis", "Page"), export_word = FALSE) toy_result$comparison_table # Fuller example using a bundled sample dataset (slower, includes Word export) sample_file <- system.file("extdata", "sample_drying_data.csv", package = "dryingkineticmodels") df <- read.csv(sample_file) result <- dryingkineticmodels(df, export_word = TRUE)# Small, fast toy example (runs automatically during R CMD check) toy_df <- data.frame( time = c(0, 30, 60, 90, 120, 150), MR = c(1.00, 0.72, 0.51, 0.36, 0.26, 0.18) ) toy_result <- dryingkineticmodels(toy_df, models = c("Lewis", "Page"), export_word = FALSE) toy_result$comparison_table # Fuller example using a bundled sample dataset (slower, includes Word export) sample_file <- system.file("extdata", "sample_drying_data.csv", package = "dryingkineticmodels") df <- read.csv(sample_file) result <- dryingkineticmodels(df, export_word = TRUE)