From 373d98038c514c5152478127a8a2b9b390ee1b58 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sun, 14 Jan 2018 18:37:07 +0100 Subject: Load mkin quietly in vignettes Static documentation articles rebuilt by pkgdown::build_articles() --- vignettes/FOCUS_L.html | 80 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'vignettes/FOCUS_L.html') diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index 180c0323..ccde0c82 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -11,7 +11,7 @@ - + Example evaluation of FOCUS Laboratory Data L1 to L3 @@ -223,7 +223,7 @@ div.tocify {

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

2017-07-21

+

2018-01-14

@@ -242,17 +242,17 @@ FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1)

Since mkin version 0.9-32 (July 2014), we can use shorthand notation like "SFO" for parent only degradation models. The following two lines fit the model and produce the summary report of the model fit. This covers the numerical analysis given in the FOCUS report.

m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet = TRUE)
 summary(m.L1.SFO)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:22 2017 
-## Date of summary: Fri Jul 21 18:02:22 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:05 2018 
+## Date of summary: Sun Jan 14 17:50:05 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 37 model solutions performed in 0.258 s
+## Fitted with method Port using 37 model solutions performed in 0.242 s
 ## 
 ## Weighting: none
 ## 
@@ -324,7 +324,7 @@ summary(m.L1.SFO)
## 30 parent 4.0 5.251 -1.2513

A plot of the fit is obtained with the plot function for mkinfit objects.

plot(m.L1.SFO, show_errmin = TRUE, main = "FOCUS L1 - SFO")
-

+

The residual plot can be easily obtained by

mkinresplot(m.L1.SFO, ylab = "Observed", xlab = "Time")

@@ -333,12 +333,12 @@ summary(m.L1.SFO)
## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation by method Port did not converge.
 ## Convergence code is 1
plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")
-

+

summary(m.L1.FOMC, data = FALSE)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:23 2017 
-## Date of summary: Fri Jul 21 18:02:23 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:06 2018 
+## Date of summary: Sun Jan 14 17:50:06 2018 
 ## 
 ## 
 ## Warning: Optimisation by method Port did not converge.
@@ -350,7 +350,7 @@ summary(m.L1.SFO)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 155 model solutions performed in 0.445 s +## Fitted with method Port using 155 model solutions performed in 0.432 s ## ## Weighting: none ## @@ -432,17 +432,17 @@ plot(m.L2.FOMC, show_residuals = TRUE, main = "FOCUS L2 - FOMC")

summary(m.L2.FOMC, data = FALSE)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:24 2017 
-## Date of summary: Fri Jul 21 18:02:24 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:07 2018 
+## Date of summary: Sun Jan 14 17:50:07 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 81 model solutions performed in 0.246 s
+## Fitted with method Port using 81 model solutions performed in 0.166 s
 ## 
 ## Weighting: none
 ## 
@@ -502,10 +502,10 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - DFOP")

summary(m.L2.DFOP, data = FALSE)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:24 2017 
-## Date of summary: Fri Jul 21 18:02:24 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:08 2018 
+## Date of summary: Sun Jan 14 17:50:08 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -514,7 +514,7 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 0.742 s
+## Fitted with method Port using 336 model solutions performed in 0.712 s
 ## 
 ## Weighting: none
 ## 
@@ -591,10 +591,10 @@ plot(mm.L3)

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.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:25 2017 
-## Date of summary: Fri Jul 21 18:02:25 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:08 2018 
+## Date of summary: Sun Jan 14 17:50:08 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -603,7 +603,7 @@ plot(mm.L3)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 137 model solutions performed in 0.371 s +## Fitted with method Port using 137 model solutions performed in 0.291 s ## ## Weighting: none ## @@ -688,20 +688,20 @@ mm.L4 <- mmkin(c("SFO", "FOMC"), cores = 1, list("FOCUS L4" = FOCUS_2006_L4_mkin), quiet = TRUE) 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:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:26 2017 
-## Date of summary: Fri Jul 21 18:02:26 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:09 2018 
+## Date of summary: Sun Jan 14 17:50:09 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 46 model solutions performed in 0.098 s
+## Fitted with method Port using 46 model solutions performed in 0.094 s
 ## 
 ## Weighting: none
 ## 
@@ -751,17 +751,17 @@ plot(mm.L4)
## DT50 DT90 ## parent 106 352
summary(mm.L4[["FOMC", 1]], data = FALSE)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:26 2017 
-## Date of summary: Fri Jul 21 18:02:26 2017 
+
## mkin version:    0.9.47.1 
+## R version:       3.4.3 
+## Date of fit:     Sun Jan 14 17:50:09 2018 
+## Date of summary: Sun Jan 14 17:50:09 2018 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.141 s
+## Fitted with method Port using 66 model solutions performed in 0.139 s
 ## 
 ## Weighting: none
 ## 
-- 
cgit v1.2.1