From 478c6d5eec4c84b22b43adcbdf36888b302ead00 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 6 Dec 2022 10:33:24 +0100 Subject: Some parplot improvements llquant argument, improved legend text, tests --- vignettes/FOCUS_L.html | 83 +++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 45 deletions(-) (limited to 'vignettes/FOCUS_L.html') diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index da6c11fe..b8c9ba0c 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -1373,8 +1373,8 @@ pre code { border-radius: 4px; } -.tabset-dropdown > .nav-tabs > li.active:before { - content: ""; +.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before { + content: "\e259"; font-family: 'Glyphicons Halflings'; display: inline-block; padding: 10px; @@ -1382,16 +1382,9 @@ pre code { } .tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before { - content: ""; - border: none; -} - -.tabset-dropdown > .nav-tabs.nav-tabs-open:before { - content: ""; + content: "\e258"; font-family: 'Glyphicons Halflings'; - display: inline-block; - padding: 10px; - border-right: 1px solid #ddd; + border: none; } .tabset-dropdown > .nav-tabs > li.active { @@ -1517,7 +1510,7 @@ div.tocify {

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

Last change 18 May 2022 (rebuilt 2022-09-14)

+

Last change 18 May 2022 (rebuilt 2022-12-06)

@@ -1536,17 +1529,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 used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:35 2022 
-## Date of summary: Wed Sep 14 22:28:35 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:45 2022 
+## Date of summary: Tue Dec  6 09:39:45 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.033 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1637,10 +1630,10 @@ summary(m.L1.SFO)
## Warning in sqrt(1/diag(V)): NaNs produced
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
 ## doubtful
-
## mkin version used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:35 2022 
-## Date of summary: Wed Sep 14 22:28:35 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:45 2022 
+## Date of summary: Tue Dec  6 09:39:45 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
@@ -1742,17 +1735,17 @@ plot(m.L2.FOMC, show_residuals = TRUE,
      main = "FOCUS L2 - FOMC")

summary(m.L2.FOMC, data = FALSE)
-
## mkin version used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:35 2022 
-## Date of summary: Wed Sep 14 22:28:35 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:45 2022 
+## Date of summary: Tue Dec  6 09:39:45 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.049 s
+## Fitted using 239 model solutions performed in 0.048 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1820,10 +1813,10 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - DFOP")

summary(m.L2.DFOP, data = FALSE)
-
## mkin version used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:36 2022 
-## Date of summary: Wed Sep 14 22:28:36 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:46 2022 
+## Date of summary: Tue Dec  6 09:39:46 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -1832,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.135 s
+## Fitted using 581 model solutions performed in 0.131 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -1920,10 +1913,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 used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:36 2022 
-## Date of summary: Wed Sep 14 22:28:36 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:46 2022 
+## Date of summary: Tue Dec  6 09:39:46 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -1932,7 +1925,7 @@ plot(mm.L3)
## ## Model predictions using solution type analytical ## -## Fitted using 376 model solutions performed in 0.081 s +## Fitted using 376 model solutions performed in 0.078 s ## ## Error model: Constant variance ## @@ -2028,17 +2021,17 @@ 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.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:36 2022 
-## Date of summary: Wed Sep 14 22:28:37 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:47 2022 
+## Date of summary: Tue Dec  6 09:39:47 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 142 model solutions performed in 0.034 s
+## Fitted using 142 model solutions performed in 0.03 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -2092,10 +2085,10 @@ plot(mm.L4)
## DT50 DT90 ## parent 106 352
summary(mm.L4[["FOMC", 1]], data = FALSE)
-
## mkin version used for fitting:    1.1.2 
-## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Sep 14 22:28:37 2022 
-## Date of summary: Wed Sep 14 22:28:37 2022 
+
## mkin version used for fitting:    1.2.2 
+## R version used for fitting:       4.2.2 
+## Date of fit:     Tue Dec  6 09:39:47 2022 
+## Date of summary: Tue Dec  6 09:39:47 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
-- 
cgit v1.2.1