From f39815aa87272849f8e0c808099c4cee780c2a81 Mon Sep 17 00:00:00 2001
From: Johannes Ranke m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet = TRUE)
summary(m.L1.SFO)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:11 2016
-## Date of summary: Wed Oct 26 23:18:11 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:48 2016
+## Date of summary: Thu Nov 3 17:47:48 2016
##
## Equations:
## d_parent = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 37 model solutions performed in 0.089 s
+## Fitted with method Port using 37 model solutions performed in 0.093 s
##
## Weighting: none
##
@@ -152,9 +155,9 @@ FOCUS_2006_L1_mkin <-
summary(m.L1.FOMC, data = FALSE)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:12 2016
-## Date of summary: Wed Oct 26 23:18:12 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:49 2016
+## Date of summary: Thu Nov 3 17:47:49 2016
##
##
## Warning: Optimisation by method Port did not converge.
@@ -166,7 +169,7 @@ FOCUS_2006_L1_mkin <-
summary(m.L2.FOMC, data = FALSE)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:12 2016
-## Date of summary: Wed Oct 26 23:18:12 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:49 2016
+## Date of summary: Thu Nov 3 17:47:49 2016
##
## Equations:
## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 81 model solutions performed in 0.191 s
+## Fitted with method Port using 81 model solutions performed in 0.189 s
##
## Weighting: none
##
@@ -319,9 +322,9 @@ FOCUS_2006_L2_mkin <-
summary(m.L2.DFOP, data = FALSE)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:13 2016
-## Date of summary: Wed Oct 26 23:18:14 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:50 2016
+## Date of summary: Thu Nov 3 17:47:50 2016
##
## Equations:
## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -330,7 +333,7 @@ FOCUS_2006_L2_mkin <- t = c(0, 3, 7, 14, 30, 60, 91, 120),
parent = c(97.8, 60, 51, 43, 35, 22, 15, 12))
FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3)
-
- Use mmkin to fit multiple models
+
+ Fit multiple models
As of mkin version 0.9-39 (June 2015), we can fit several models to one or more datasets in one call to the function mmkin
. The datasets have to be passed in a list, in this case a named list holding only the L3 dataset prepared above.
# Only use one core here, not to offend the CRAN checks
mm.L3 <- mmkin(c("SFO", "FOMC", "DFOP"), cores = 1,
@@ -402,15 +405,15 @@ mm.L3 <-
The \(\chi^2\) error level of 21% as well as the plot suggest that the SFO model does not fit very well. The FOMC model performs better, with an error level at which the \(\chi^2\) test passes of 7%. Fitting the four parameter DFOP model further reduces the \(\chi^2\) error level considerably.
-
- Accessing elements of mmkin objects
+
+ Accessing mmkin objects
The objects returned by mmkin are arranged like a matrix, with models as a row index and datasets as a column index.
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: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:15 2016
-## Date of summary: Wed Oct 26 23:18:15 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:51 2016
+## Date of summary: Thu Nov 3 17:47:52 2016
##
## Equations:
## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -419,7 +422,7 @@ mm.L3 <- \(\chi^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 \(\chi^2\) test passes is slightly lower for the FOMC model. However, the difference appears negligible.
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:15 2016
-## Date of summary: Wed Oct 26 23:18:16 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:52 2016
+## Date of summary: Thu Nov 3 17:47:52 2016
##
## Equations:
## d_parent = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 46 model solutions performed in 0.108 s
+## Fitted with method Port using 46 model solutions performed in 0.107 s
##
## Weighting: none
##
@@ -568,16 +571,16 @@ mm.L4 <- summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version: 0.9.44.9000
-## R version: 3.3.1
-## Date of fit: Wed Oct 26 23:18:16 2016
-## Date of summary: Wed Oct 26 23:18:16 2016
+## R version: 3.3.2
+## Date of fit: Thu Nov 3 17:47:52 2016
+## Date of summary: Thu Nov 3 17:47:52 2016
##
## Equations:
## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 66 model solutions performed in 0.151 s
+## Fitted with method Port using 66 model solutions performed in 0.148 s
##
## Weighting: none
##
@@ -647,8 +650,8 @@ mm.L4 <- FOMC fit for L2
DFOP fit for L2
- Laboratory Data L3
--
cgit v1.2.1