From cff25a78e0e5a9d46db575b1ae3b02ace560aaf6 Mon Sep 17 00:00:00 2001
From: Johannes Ranke Each system is characterized by the operating system type, the CPU type, the mkin version, and, as in June 2022 the current R version lead to worse performance, the R version. A compiler was available, so if no analytical solution was available, compiled ODE models are used. Every fit is only performed once, so the accuracy of the benchmarks is limited. The following wrapper function for Parent only: One metabolite: Two metabolites, synthetic data: Ranke J (2022).
mkin: Kinetic Evaluation of Chemical Degradation Data.
-R package version 1.1.1, https://pkgdown.jrwb.de/mkin/.
+R package version 1.1.2, https://pkgdown.jrwb.de/mkin/.
‘R/convergence.R’: New generic to show convergence information with a method for ‘mmin’ objects. ‘R/illparms.R’: New generic to show ill-defined parameters with methods for ‘mkinfit’ and ‘mmkin’ objects. ‘R/summary.mmkin.R’: Summary method for mmkin objects. ’R/{mkinmod,mkinpredict}.R: Store DLL information in mkinmod objects and use that information in mkinpredict to avoid a performance regression brought by a bugfix in R 4.2.x. Thanks to Tomas Kalibera for his analysis of the problem on the r-package-devel list and his suggestion on how to fix it. Method to get convergence information The object to investigate For potential future extensions The object to be printed Method to get the names of ill-defined parameters The object to investigate For potential future extensions The confidence level for checking p values The object to be printed For mkinfit objects, a character vector of parameter names
+For mmkin objects, an object of class 'illparms.mmkin' with a
+suitable printing method.Benchmark timings for mkin
Johannes Ranke
- Last change 1 July 2022 (rebuilt 2022-07-12)
+ Last change 14 July 2022 (rebuilt 2022-07-22)
Source: vignettes/web_only/benchmarks.rmd
benchmarks.rmd
mmkin
is used because the way the error model is specified was changed in mkin version 0.9.49.1.
+
if (packageVersion("mkin") > "0.9.48.1") {
+ mmkin_bench <- function(models, datasets, error_model = "const") {
+ mmkin(models, datasets, error_model = error_model, cores = 1, quiet = TRUE)
+ }
+} else {
+ mmkin_bench <- function(models, datasets, error_model = NULL) {
+ mmkin(models, datasets, reweight.method = error_model, cores = 1, quiet = TRUE)
+ }
+}
Test cases
+
FOCUS_C <- FOCUS_2006_C
FOCUS_D <- subset(FOCUS_2006_D, value != 0)
parent_datasets <- list(FOCUS_C, FOCUS_D)
+
t1 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), parent_datasets))[["elapsed"]]
t2 <- system.time(mmkin_bench(c("SFO", "FOMC", "DFOP", "HS"), parent_datasets,
error_model = "tc"))[["elapsed"]]
+
SFO_SFO <- mkinmod(
parent = mkinsub("SFO", "m1"),
m1 = mkinsub("SFO"))
@@ -145,7 +157,7 @@
t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
error_model = "obs"))[["elapsed"]]
+
-
Results
@@ -322,8 +328,16 @@
Ryzen 7 1700
4.2.1
1.1.1
-1.809
-3.468
+1.770
+3.377
+
+
+
@@ -483,9 +497,18 @@
Linux
+Ryzen 7 1700
+4.2.1
+1.1.2
+1.962
+3.606
Ryzen 7 1700
4.2.1
1.1.1
-1.336
-5.820
-2.621
+1.308
+5.758
+2.558
+
+
+
@@ -693,12 +716,24 @@
Linux
+Ryzen 7 1700
+4.2.1
+1.1.2
+1.465
+6.184
+2.752
Ryzen 7 1700
4.2.1
1.1.1
-0.707
-1.148
-1.339
-2.812
-1.752
-2.594
+0.696
+1.124
+1.321
+2.786
+1.744
+2.566
+
+
+
diff --git a/docs/authors.html b/docs/authors.html
index afa0d11c..9daad578 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -17,7 +17,7 @@
Linux
+Ryzen 7 1700
+4.2.1
+1.1.2
+0.857
+1.298
+1.504
+3.011
+1.888
+2.756
@Manual{,
title = {mkin: Kinetic Evaluation of Chemical Degradation Data},
author = {Johannes Ranke},
year = {2022},
- note = {R package version 1.1.1},
+ note = {R package version 1.1.2},
url = {https://pkgdown.jrwb.de/mkin/},
}
diff --git a/docs/index.html b/docs/index.html
index 6e6a90fa..6118572b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -44,7 +44,7 @@
NEWS.md
mkin 1.1.2
+mkin 1.1.1
convergence(object, ...)
+
+# S3 method for mmkin
+convergence(object, ...)
+
+# S3 method for convergence.mmkin
+print(x, ...)
Arguments
+ illparms(object, ...)
+
+# S3 method for mkinfit
+illparms(object, conf.level = 0.95, ...)
+
+# S3 method for mmkin
+illparms(object, conf.level = 0.95, ...)
+
+# S3 method for illparms.mmkin
+print(x, ...)
Arguments
+ Value
+
+
+Examples
+ fit <- mkinfit("FOMC", FOCUS_2006_A, quiet = TRUE)
+illparms(fit)
+#> [1] "parent_0" "alpha" "beta" "sigma"
+# \dontrun{
+fits <- mmkin(
+ c("SFO", "FOMC"),
+ list("FOCUS A" = FOCUS_2006_A,
+ "FOCUS C" = FOCUS_2006_C),
+ quiet = TRUE)
+illparms(fits)
+#> dataset
+#> model FOCUS A FOCUS C
+#> SFO
+#> FOMC parent_0, alpha, beta, sigma
+# }
+
Calculate the AIC for a column of an mmkin object
Method to get convergence information
Method to get the names of ill-defined parameters
Summary method for class "mmkin"
Create and work with nonlinear mixed effects models
diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 6d816366..17ecdfe4 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -21,7 +21,7 @@ values."> + + +Shows convergence information on the mkinfit objects contained in the object +and gives an overview of ill-defined parameters calculated by illparms.
+an object of class mmkin
confidence level for testing parameters
optional arguments passed to methods like print
.
an object of class summary.mmkin
.
number of digits to use for printing
+fits <- mmkin(
+ c("SFO", "FOMC"),
+ list("FOCUS A" = FOCUS_2006_A,
+ "FOCUS C" = FOCUS_2006_C),
+ quiet = TRUE, cores = 1)
+ summary(fits)
+#> Error model: Constant variance
+#> Fitted in 0.607 s
+#>
+#> Convergence:
+#> dataset
+#> model FOCUS A FOCUS C
+#> SFO OK OK
+#> FOMC OK OK
+#>
+#> OK: No warnings
+#>
+#> Ill-defined parameters:
+#> dataset
+#> model FOCUS A FOCUS C
+#> SFO
+#> FOMC parent_0, alpha, beta, sigma
+
+