From f35e0b3d3b9f41bee2f5cc357afcb69e3aadad15 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 8 Jul 2022 17:39:44 +0200 Subject: Store DLL info in mkinmod objects for performance Thanks to Tomas Kalibera for his analysis of the problem on the r-package-devel mailing list and for the suggestion on how to fix it. See the current benchmark vignette for the new data on mkin 1.1.1 with R 4.2.1, with unprecedented performance. --- vignettes/FOCUS_L.html | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'vignettes/FOCUS_L.html') diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index 45d264b4..13d0d9eb 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -1517,7 +1517,7 @@ div.tocify {

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

Last change 17 November 2016 (rebuilt 2022-05-18)

+

Last change 18 May 2022 (rebuilt 2022-07-08)

@@ -1537,16 +1537,16 @@ FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1)
m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet = TRUE)
 summary(m.L1.SFO)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:22 2022 
-## Date of summary: Wed May 18 20:03:22 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:39 2022 
+## Date of summary: Fri Jul  8 15:44:39 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 133 model solutions performed in 0.032 s
+## Fitted using 133 model solutions performed in 0.029 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1636,16 +1636,16 @@ plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
 ## doubtful
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:22 2022 
-## Date of summary: Wed May 18 20:03:22 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:39 2022 
+## Date of summary: Fri Jul  8 15:44:40 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 357 model solutions performed in 0.07 s
+## Fitted using 357 model solutions performed in 0.071 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1736,16 +1736,16 @@ plot(m.L2.FOMC, show_residuals = TRUE,
 

summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:22 2022 
-## Date of summary: Wed May 18 20:03:22 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:40 2022 
+## Date of summary: Fri Jul  8 15:44:40 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 239 model solutions performed in 0.043 s
+## Fitted using 239 model solutions performed in 0.045 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1814,9 +1814,9 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
 

summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:23 2022 
-## Date of summary: Wed May 18 20:03:23 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:40 2022 
+## Date of summary: Fri Jul  8 15:44:40 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -1825,7 +1825,7 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 581 model solutions performed in 0.118 s
+## Fitted using 581 model solutions performed in 0.119 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1914,9 +1914,9 @@ plot(mm.L3)

We can extract the summary and plot for e.g. the DFOP fit, using square brackets for indexing which will result in the use of the summary and plot functions working on mkinfit objects.

summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:23 2022 
-## Date of summary: Wed May 18 20:03:23 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:40 2022 
+## Date of summary: Fri Jul  8 15:44:41 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -1925,7 +1925,7 @@ plot(mm.L3)
## ## Model predictions using solution type analytical ## -## Fitted using 376 model solutions performed in 0.073 s +## Fitted using 376 model solutions performed in 0.072 s ## ## Error model: Constant variance ## @@ -2022,9 +2022,9 @@ plot(mm.L4)

The χ2 error level of 3.3% as well as the plot suggest that the SFO model fits very well. The error level at which the χ2 test passes is slightly lower for the FOMC model. However, the difference appears negligible.

summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:23 2022 
-## Date of summary: Wed May 18 20:03:23 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:41 2022 
+## Date of summary: Fri Jul  8 15:44:41 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -2086,16 +2086,16 @@ plot(mm.L4)
## parent 106 352
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.2.0 
-## Date of fit:     Wed May 18 20:03:23 2022 
-## Date of summary: Wed May 18 20:03:23 2022 
+## R version used for fitting:       4.2.1 
+## Date of fit:     Fri Jul  8 15:44:41 2022 
+## Date of summary: Fri Jul  8 15:44:41 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 224 model solutions performed in 0.04 s
+## Fitted using 224 model solutions performed in 0.041 s
 ## 
 ## Error model: Constant variance 
 ## 
-- 
cgit v1.2.1