From 1511ed0a775e15ec2158e22d08a4da00cdd834aa Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 16 Nov 2017 17:13:35 +0100 Subject: Use html_vignette for FOCUS_D vignette, fix address Static documentation articles rebuilt by pkgdown::build_articles() --- docs/articles/FOCUS_D.html | 11 +- docs/articles/FOCUS_D_files/figure-html/plot-1.png | Bin 98934 -> 39955 bytes .../FOCUS_D_files/figure-html/plot_2-1.png | Bin 14308 -> 6454 bytes docs/articles/FOCUS_L.html | 79 +++++---- docs/articles/FOCUS_Z.R | 33 ++-- docs/articles/FOCUS_Z.html | 13 +- docs/articles/compiled_models.html | 36 ++--- docs/articles/index.html | 9 +- docs/articles/mkin.html | 15 +- docs/articles/twa.html | 11 +- vignettes/FOCUS_D.Rmd | 4 +- vignettes/FOCUS_D.html | 179 +++++++-------------- vignettes/FOCUS_Z.Rmd | 2 +- vignettes/FOCUS_Z.html | 6 +- vignettes/mkin.Rmd | 2 +- vignettes/mkin.html | 19 +-- 16 files changed, 144 insertions(+), 275 deletions(-) diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 6607d614..d6941019 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -62,14 +62,7 @@ News - + @@ -84,7 +77,7 @@

Example evaluation of FOCUS Example Dataset D

Johannes Ranke

-

2017-09-14

+

2017-11-16

diff --git a/docs/articles/FOCUS_D_files/figure-html/plot-1.png b/docs/articles/FOCUS_D_files/figure-html/plot-1.png index c0fab72d..75c4c299 100644 Binary files a/docs/articles/FOCUS_D_files/figure-html/plot-1.png and b/docs/articles/FOCUS_D_files/figure-html/plot-1.png differ diff --git a/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png b/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png index 47916477..94e7e2b3 100644 Binary files a/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png and b/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png differ diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index b89c7b20..7cef7abd 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -62,14 +62,7 @@ News - + @@ -84,7 +77,7 @@

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

2017-09-14

+

2017-11-16

@@ -105,17 +98,17 @@ FOCUS_2006_L1_mkin <- 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.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:03 2017 
-## Date of summary: Thu Sep 14 12:15:03 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:46 2017 
+## Date of summary: Thu Nov 16 17:12:46 2017 
 ## 
 ## 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.255 s
+## Fitted with method Port using 37 model solutions performed in 0.253 s
 ## 
 ## Weighting: none
 ## 
@@ -198,10 +191,10 @@ FOCUS_2006_L1_mkin <- 
plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")

summary(m.L1.FOMC, data = FALSE)
-
## mkin version:    0.9.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:05 2017 
-## Date of summary: Thu Sep 14 12:15:05 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:47 2017 
+## Date of summary: Thu Nov 16 17:12:47 2017 
 ## 
 ## 
 ## Warning: Optimisation by method Port did not converge.
@@ -213,7 +206,7 @@ FOCUS_2006_L1_mkin <-  main = "FOCUS L2 - FOMC")

summary(m.L2.FOMC, data = FALSE)
-
## mkin version:    0.9.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:06 2017 
-## Date of summary: Thu Sep 14 12:15:06 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:48 2017 
+## Date of summary: Thu Nov 16 17:12:48 2017 
 ## 
 ## 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.176 s
+## Fitted with method Port using 81 model solutions performed in 0.183 s
 ## 
 ## Weighting: none
 ## 
@@ -369,10 +362,10 @@ FOCUS_2006_L2_mkin <- main = "FOCUS L2 - DFOP")

summary(m.L2.DFOP, data = FALSE)
-
## mkin version:    0.9.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:07 2017 
-## Date of summary: Thu Sep 14 12:15:07 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:49 2017 
+## Date of summary: Thu Nov 16 17:12:49 2017 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -381,7 +374,7 @@ FOCUS_2006_L2_mkin <-  
summary(mm.L3[["DFOP", 1]])
-
## mkin version:    0.9.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:08 2017 
-## Date of summary: Thu Sep 14 12:15:08 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:50 2017 
+## Date of summary: Thu Nov 16 17:12:50 2017 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -473,7 +466,7 @@ mm.L3 <-  

The \(\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.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:08 2017 
-## Date of summary: Thu Sep 14 12:15:09 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:50 2017 
+## Date of summary: Thu Nov 16 17:12:51 2017 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
@@ -622,17 +615,17 @@ mm.L4 <- 
summary(mm.L4[["FOMC", 1]], data = FALSE)
-
## mkin version:    0.9.46.1 
-## R version:       3.4.1 
-## Date of fit:     Thu Sep 14 12:15:08 2017 
-## Date of summary: Thu Sep 14 12:15:09 2017 
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:12:51 2017 
+## Date of summary: Thu Nov 16 17:12:51 2017 
 ## 
 ## 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.151 s
+## Fitted with method Port using 66 model solutions performed in 0.136 s
 ## 
 ## Weighting: none
 ## 
diff --git a/docs/articles/FOCUS_Z.R b/docs/articles/FOCUS_Z.R
index 5c70b57e..a77441cf 100644
--- a/docs/articles/FOCUS_Z.R
+++ b/docs/articles/FOCUS_Z.R
@@ -1,10 +1,9 @@
-## ----include=FALSE--------------------------------------------------
+## ---- include = FALSE----------------------------------------------------
 require(knitr)
-opts_chunk$set(engine='R', tidy = FALSE, cache = TRUE)
-options(width=70)
+opts_chunk$set(engine='R', tidy = FALSE)
 
-## ----FOCUS_2006_Z_data, echo=TRUE, eval=TRUE------------------------
-require(mkin)
+## ---- echo = TRUE, fig = TRUE, fig.width = 8, fig.height = 7-------------
+library(mkin, quiet = TRUE)
 LOD = 0.5
 FOCUS_2006_Z = data.frame(
   t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21,
@@ -20,14 +19,14 @@ FOCUS_2006_Z = data.frame(
 
 FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z)
 
-## ----FOCUS_2006_Z_fits_1, echo=TRUE, fig.height=6-------------------
+## ----FOCUS_2006_Z_fits_1, echo=TRUE, fig.height=6------------------------
 Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"),
                 Z1 = mkinsub("SFO"))
 m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.2a)
 summary(m.Z.2a, data = FALSE)$bpar
 
-## ----FOCUS_2006_Z_fits_2, echo=TRUE, fig.height=6-------------------
+## ----FOCUS_2006_Z_fits_2, echo=TRUE, fig.height=6------------------------
 Z.2a.ff <- mkinmod(Z0 = mkinsub("SFO", "Z1"),
                    Z1 = mkinsub("SFO"),
                    use_of_ff = "max")
@@ -36,21 +35,21 @@ m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.2a.ff)
 summary(m.Z.2a.ff, data = FALSE)$bpar
 
-## ----FOCUS_2006_Z_fits_3, echo=TRUE, fig.height=6-------------------
+## ----FOCUS_2006_Z_fits_3, echo=TRUE, fig.height=6------------------------
 Z.3 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
                Z1 = mkinsub("SFO"), use_of_ff = "max")
 m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.3)
 summary(m.Z.3, data = FALSE)$bpar
 
-## ----FOCUS_2006_Z_fits_5, echo=TRUE, fig.height=7-------------------
+## ----FOCUS_2006_Z_fits_5, echo=TRUE, fig.height=7------------------------
 Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
                Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                Z2 = mkinsub("SFO"), use_of_ff = "max")
 m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.5)
 
-## ----FOCUS_2006_Z_fits_6, echo=TRUE, fig.height=8-------------------
+## ----FOCUS_2006_Z_fits_6, echo=TRUE, fig.height=8------------------------
 Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                    Z2 = mkinsub("SFO", "Z3"),
@@ -63,7 +62,7 @@ plot_sep(m.Z.FOCUS)
 summary(m.Z.FOCUS, data = FALSE)$bpar
 endpoints(m.Z.FOCUS)
 
-## ----FOCUS_2006_Z_fits_7, echo=TRUE, fig.height=8-------------------
+## ----FOCUS_2006_Z_fits_7, echo=TRUE, fig.height=8------------------------
 Z.mkin.1 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO", "Z3"),
@@ -72,14 +71,14 @@ m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.mkin.1)
 summary(m.Z.mkin.1, data = FALSE)$cov.unscaled
 
-## ----FOCUS_2006_Z_fits_9, echo=TRUE, fig.height=8-------------------
+## ----FOCUS_2006_Z_fits_9, echo=TRUE, fig.height=8------------------------
 Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO"))
 m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE)
 plot_sep(m.Z.mkin.3)
 
-## ----FOCUS_2006_Z_fits_10, echo=TRUE, fig.height=8------------------
+## ----FOCUS_2006_Z_fits_10, echo=TRUE, fig.height=8-----------------------
 Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO", "Z3"),
@@ -89,7 +88,7 @@ m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin,
                       quiet = TRUE)
 plot_sep(m.Z.mkin.4)
 
-## ----FOCUS_2006_Z_fits_11, echo=TRUE, fig.height=8------------------
+## ----FOCUS_2006_Z_fits_11, echo=TRUE, fig.height=8-----------------------
 Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO", "Z3"),
@@ -99,7 +98,7 @@ m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin,
                       quiet = TRUE)
 plot_sep(m.Z.mkin.5)
 
-## ----FOCUS_2006_Z_fits_11a, echo=TRUE-------------------------------
+## ----FOCUS_2006_Z_fits_11a, echo=TRUE------------------------------------
 m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin,
                        parms.ini = c(m.Z.mkin.5$bparms.ode[1:7],
                                      k_Z3_bound_free = 0),
@@ -107,9 +106,9 @@ m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin,
                        quiet = TRUE)
 plot_sep(m.Z.mkin.5a)
 
-## ----FOCUS_2006_Z_fits_11b, echo=TRUE-------------------------------
+## ----FOCUS_2006_Z_fits_11b, echo=TRUE------------------------------------
 mkinparplot(m.Z.mkin.5a)
 
-## ----FOCUS_2006_Z_fits_11b_endpoints, echo=TRUE---------------------
+## ----FOCUS_2006_Z_fits_11b_endpoints, echo=TRUE--------------------------
 endpoints(m.Z.mkin.5a)
 
diff --git a/docs/articles/FOCUS_Z.html b/docs/articles/FOCUS_Z.html
index c3bb5180..d16299ca 100644
--- a/docs/articles/FOCUS_Z.html
+++ b/docs/articles/FOCUS_Z.html
@@ -62,14 +62,7 @@
   News
 
       
-
+
 
 
   
@@ -84,13 +77,13 @@
       

Example evaluation of FOCUS dataset Z

Johannes Ranke

-

2017-09-14

+

2017-11-16

-

Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

+

Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

The data

diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html index af47841b..68aa1bac 100644 --- a/docs/articles/compiled_models.html +++ b/docs/articles/compiled_models.html @@ -62,14 +62,7 @@ News - +
@@ -84,7 +77,7 @@

Performance benefit by using compiled model definitions in mkin

Johannes Ranke

-

2017-09-14

+

2017-11-16

@@ -98,13 +91,8 @@
##            gcc 
 ## "/usr/bin/gcc"

First, we build a simple degradation model for a parent compound with one metabolite.

-
library("mkin")
-
## Lade nötiges Paket: minpack.lm
-
## Lade nötiges Paket: rootSolve
-
## Lade nötiges Paket: inline
-
## Lade nötiges Paket: methods
-
## Lade nötiges Paket: parallel
-
SFO_SFO <- mkinmod(
+
library("mkin")
+SFO_SFO <- mkinmod(
   parent = mkinsub("SFO", "m1"),
   m1 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
@@ -127,9 +115,9 @@ }
## Lade nötiges Paket: rbenchmark
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   2.038    1.000     2.036        0
-## 1 deSolve, not compiled            3  14.822    7.273    14.824        0
-## 2      Eigenvalue based            3   2.543    1.248     2.544        0
+## 3     deSolve, compiled            3   2.029    1.000     2.028        0
+## 1 deSolve, not compiled            3  14.237    7.017    14.236        0
+## 2      Eigenvalue based            3   2.700    1.331     2.700        0
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
@@ -158,14 +146,14 @@
 }
## Successfully compiled differential equation model from auto-generated C code.
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   3.488    1.000     3.488        0
-## 1 deSolve, not compiled            3  30.604    8.774    30.600        0
+## 2     deSolve, compiled            3   3.495    1.000     3.496        0
+## 1 deSolve, not compiled            3  29.264    8.373    29.260        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
-

Here we get a performance benefit of a factor of 9 using the version of the differential equation model compiled from C code!

-

This vignette was built with mkin 0.9.46.1 on

-
## R version 3.4.1 (2017-06-30)
+

Here we get a performance benefit of a factor of 8 using the version of the differential equation model compiled from C code!

+

This vignette was built with mkin 0.9.46.2 on

+
## R version 3.4.2 (2017-09-28)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
 ## Running under: Debian GNU/Linux 9 (stretch)
## CPU model: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
diff --git a/docs/articles/index.html b/docs/articles/index.html index d02bfe80..0a355e17 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -86,12 +86,7 @@ @@ -101,7 +96,7 @@
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index 92bd2bb4..14349e53 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -62,14 +62,7 @@ News - +
@@ -84,13 +77,13 @@

Introduction to mkin

Johannes Ranke

-

2017-09-14

+

2017-11-16

-

Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

+

Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

Abstract

@@ -147,7 +140,7 @@ f_SFO_SFO_SFO <- documentation page and manual for further information.

+

A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named gmkin. Please see its documentation page and manual for further information.

diff --git a/docs/articles/twa.html b/docs/articles/twa.html index 3a1d5731..0a4df0ff 100644 --- a/docs/articles/twa.html +++ b/docs/articles/twa.html @@ -62,14 +62,7 @@ News - +

@@ -84,7 +77,7 @@

Calculation of time weighted average concentrations with mkin

Johannes Ranke

-

2017-09-14

+

2017-11-16

diff --git a/vignettes/FOCUS_D.Rmd b/vignettes/FOCUS_D.Rmd index 40bcb157..9cb9c529 100644 --- a/vignettes/FOCUS_D.Rmd +++ b/vignettes/FOCUS_D.Rmd @@ -3,10 +3,8 @@ title: Example evaluation of FOCUS Example Dataset D author: Johannes Ranke date: "`r Sys.Date()`" output: - html_document: + html_vignette: mathjax: null - theme: united - fig_retina: null vignette: > %\VignetteIndexEntry{Example evaluation of FOCUS Example Dataset D} %\VignetteEngine{knitr::rmarkdown} diff --git a/vignettes/FOCUS_D.html b/vignettes/FOCUS_D.html index 44bbe062..abd7d129 100644 --- a/vignettes/FOCUS_D.html +++ b/vignettes/FOCUS_D.html @@ -8,130 +8,75 @@ + - + Example evaluation of FOCUS Example Dataset D - - - - - - - - - + - - - + - - - - -
- - - - - - - - - - - -

This is just a very simple vignette showing how to fit a degradation model for a parent compound with one transformation product using mkin. After loading the library we look a the data. We have observed concentrations in the column named value at the times specified in column time for the two observed variables named parent and m1.

-
library("mkin")
-
## Loading required package: minpack.lm
-
## Loading required package: rootSolve
-
## Loading required package: inline
-
## Loading required package: methods
-
## Loading required package: parallel
-
print(FOCUS_2006_D)
+
library("mkin")
+print(FOCUS_2006_D)
##      name time  value
 ## 1  parent    0  99.46
 ## 2  parent    0 102.04
@@ -179,27 +124,27 @@ $(document).ready(function () {
 ## 44     m1  120  33.31

Next we specify the degradation model: The parent compound degrades with simple first-order kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics.

The call to mkinmod returns a degradation model. The differential equations represented in R code can be found in the character vector $diffs of the mkinmod object. If a C compiler (gcc) is installed and functional, the differential equation model will be compiled from auto-generated C code.

-
SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
+
SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
-
print(SFO_SFO$diffs)
+
print(SFO_SFO$diffs)
##                                                       parent 
 ## "d_parent = - k_parent_sink * parent - k_parent_m1 * parent" 
 ##                                                           m1 
 ##             "d_m1 = + k_parent_m1 * parent - k_m1_sink * m1"

We do the fitting without progress report (quiet = TRUE).

-
fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE)
+
fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE)

A plot of the fit including a residual plot for both observed variables is obtained using the plot_sep method for mkinfit objects, which shows separate graphs for all compounds and their residuals.

-
plot_sep(fit, lpos = c("topright", "bottomright"))
-

+
plot_sep(fit, lpos = c("topright", "bottomright"))
+

Confidence intervals for the parameter estimates are obtained using the mkinparplot function.

-
mkinparplot(fit)
+
mkinparplot(fit)

A comprehensive report of the results is obtained using the summary method for mkinfit objects.

-
summary(fit)
-
## mkin version:    0.9.45.2 
-## R version:       3.4.1 
-## Date of fit:     Fri Jul 21 18:02:19 2017 
-## Date of summary: Fri Jul 21 18:02:20 2017 
+
summary(fit)
+
## mkin version:    0.9.46.2 
+## R version:       3.4.2 
+## Date of fit:     Thu Nov 16 17:07:26 2017 
+## Date of summary: Thu Nov 16 17:07:27 2017 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
@@ -207,7 +152,7 @@ $(document).ready(function () {
 ## 
 ## Model predictions using solution type deSolve 
 ## 
-## Fitted with method Port using 153 model solutions performed in 1.059 s
+## Fitted with method Port using 153 model solutions performed in 1.031 s
 ## 
 ## Weighting: none
 ## 
@@ -322,21 +267,5 @@ $(document).ready(function () {
 
 
 
-
- - - - diff --git a/vignettes/FOCUS_Z.Rmd b/vignettes/FOCUS_Z.Rmd index e88eceb5..d61f7387 100644 --- a/vignettes/FOCUS_Z.Rmd +++ b/vignettes/FOCUS_Z.Rmd @@ -15,7 +15,7 @@ vignette: > %\VignetteEncoding{UTF-8} --- -[Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany](http://www.jrwb.de)
+[Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany](http://www.jrwb.de)
[Privatdozent at the University of Bremen](http://chem.uft.uni-bremen.de/ranke) ```{r, include = FALSE} diff --git a/vignettes/FOCUS_Z.html b/vignettes/FOCUS_Z.html index 0437075c..369e913d 100644 --- a/vignettes/FOCUS_Z.html +++ b/vignettes/FOCUS_Z.html @@ -11,7 +11,7 @@ - + Example evaluation of FOCUS dataset Z @@ -234,12 +234,12 @@ div.tocify {

Example evaluation of FOCUS dataset Z

Johannes Ranke

-

2017-09-14

+

2017-11-16

-

Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

+

Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

The data

The following code defines the example dataset from Appendix 7 to the FOCUS kinetics report (FOCUS Work Group on Degradation Kinetics 2014, 354).

diff --git a/vignettes/mkin.Rmd b/vignettes/mkin.Rmd index e3cac1d1..84bc5adb 100644 --- a/vignettes/mkin.Rmd +++ b/vignettes/mkin.Rmd @@ -15,7 +15,7 @@ vignette: > %\VignetteEncoding{UTF-8} --- -[Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany](http://www.jrwb.de)
+[Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany](http://www.jrwb.de)
[Privatdozent at the University of Bremen](http://chem.uft.uni-bremen.de/ranke) ```{r, include = FALSE} diff --git a/vignettes/mkin.html b/vignettes/mkin.html index 5c9c1a84..f87c967f 100644 --- a/vignettes/mkin.html +++ b/vignettes/mkin.html @@ -11,7 +11,7 @@ - + Introduction to mkin @@ -234,22 +234,17 @@ div.tocify {

Introduction to mkin

Johannes Ranke

-

2017-07-21

+

2017-11-16

-

Wissenschaftlicher Berater, Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

+

Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Bremen

Abstract

In the regulatory evaluation of chemical substances like plant protection products (pesticides), biocides and other chemicals, degradation data play an important role. For the evaluation of pesticide degradation experiments, detailed guidance has been developed, based on nonlinear optimisation. The R add-on package mkin (Ranke 2016) implements fitting some of the models recommended in this guidance from within R and calculates some statistical measures for data series within one or more compartments, for parent and metabolites.

-
library(mkin)
-
## Loading required package: minpack.lm
-
## Loading required package: rootSolve
-
## Loading required package: inline
-
## Loading required package: methods
-
## Loading required package: parallel
-
# Define the kinetic model
+
library(mkin)
+# Define the kinetic model
 m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
                          M1 = mkinsub("SFO", "M2"),
                          M2 = mkinsub("SFO"),
@@ -276,7 +271,7 @@ f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE)
 
 # Plot the results separately for parent and metabolites
 plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright"))
-

+

Background

@@ -293,7 +288,7 @@ plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright",

Soon after the publication of mkin, two derived tools were published, namely KinGUII (available from Bayer Crop Science) and CAKE (commissioned to Tessella by Syngenta), which added a graphical user interface (GUI), and added fitting by iteratively reweighted least squares (IRLS) and characterisation of likely parameter distributions by Markov Chain Monte Carlo (MCMC) sampling.

CAKE focuses on a smooth use experience, sacrificing some flexibility in the model definition, originally allowing only two primary metabolites in parallel. The current version 3.2 of CAKE release in March 2016 uses a basic scheme for up to six metabolites in a flexible arrangement, but does not support back-reactions (non-instantaneous equilibria) or biphasic kinetics for metabolites.

KinGUI offers an even more flexible widget for specifying complex kinetic models. Back-reactions (non-instanteneous equilibria) were supported early on, but until 2014, only simple first-order models could be specified for transformation products. Starting with KinGUII version 2.1, biphasic modelling of metabolites was also available in KinGUII.

-

A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named gmkin. Please see its documentation page and manual for further information.

+

A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named gmkin. Please see its documentation page and manual for further information.

Recent developments

-- cgit v1.2.1