From 98d684becd9495d370e1bcc8f9c7ca758caa4dd8 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Nov 2016 22:58:28 +0100 Subject: Static documentation rebuilt by pkgdown::build_site() --- docs/articles/FOCUS_D.R | 20 ------ docs/articles/FOCUS_D.html | 10 +-- docs/articles/FOCUS_D_cache/html/__packages | 4 ++ .../data_7c3240ac153a7639ee517a9110a0f103.RData | Bin 0 -> 3175 bytes .../html/data_7c3240ac153a7639ee517a9110a0f103.rdb | 0 .../html/data_7c3240ac153a7639ee517a9110a0f103.rdx | Bin 0 -> 113 bytes .../fit_33941ca5d01df032930f2f38dc298a59.RData | Bin 0 -> 2735 bytes .../html/fit_33941ca5d01df032930f2f38dc298a59.rdb | Bin 0 -> 15588 bytes .../html/fit_33941ca5d01df032930f2f38dc298a59.rdx | Bin 0 -> 161 bytes .../model_7de92bef541220dbe2d2832243e35870.RData | Bin 0 -> 2927 bytes .../model_7de92bef541220dbe2d2832243e35870.rdb | Bin 0 -> 1776 bytes .../model_7de92bef541220dbe2d2832243e35870.rdx | Bin 0 -> 147 bytes .../plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData | Bin 0 -> 2769 bytes .../plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb | 0 .../plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx | Bin 0 -> 113 bytes .../plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData | Bin 2769 -> 0 bytes .../plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb | 0 .../plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx | Bin 113 -> 0 bytes .../plot_7873ad9c0e1495350681617620f6522d.RData | Bin 2781 -> 0 bytes .../html/plot_7873ad9c0e1495350681617620f6522d.rdb | 0 .../html/plot_7873ad9c0e1495350681617620f6522d.rdx | Bin 113 -> 0 bytes .../plot_a02b9c8bb9ae9921707cd87235ec2008.RData | Bin 0 -> 2799 bytes .../html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb | 0 .../html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx | Bin 0 -> 113 bytes ...-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData | Bin 0 -> 4629 bytes ...ed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb | 0 ...ed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx | Bin 0 -> 113 bytes docs/articles/FOCUS_D_files/figure-html/plot-1.png | Bin 74304 -> 95834 bytes .../FOCUS_D_files/figure-html/plot_2-1.png | Bin 13789 -> 14059 bytes docs/articles/FOCUS_L.R | 49 +++++++++++++- docs/articles/FOCUS_L.html | 74 ++++++++++----------- docs/articles/FOCUS_Z.R | 32 +++++++-- docs/articles/FOCUS_Z.Rnw | 66 +++++++++--------- docs/articles/FOCUS_Z.pdf | Bin 239558 -> 239558 bytes docs/articles/compiled_models.R | 10 +-- docs/articles/compiled_models.html | 42 ++++++------ .../figure-html/benchmark_FOMC_SFO-1.png | Bin 10652 -> 9514 bytes .../figure-html/benchmark_SFO_SFO-1.png | Bin 11994 -> 11028 bytes docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf | Bin 7496 -> 7496 bytes docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf | Bin 11048 -> 11048 bytes docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf | Bin 11072 -> 11072 bytes docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf | Bin 10940 -> 10940 bytes docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf | Bin 5023 -> 5023 bytes docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf | Bin 7481 -> 7481 bytes docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf | Bin 7482 -> 7482 bytes docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf | Bin 9099 -> 9099 bytes docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf | Bin 10771 -> 10771 bytes docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf | Bin 10754 -> 10754 bytes docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf | Bin 9392 -> 9392 bytes docs/articles/mkin.R | 24 +++++-- docs/articles/mkin.html | 28 +++++--- docs/articles/mkin_cache/html/__packages | 13 ++-- ...-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData | Bin 0 -> 3376 bytes ...ed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb | Bin 0 -> 105223 bytes ...ed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx | Bin 0 -> 236 bytes ...-chunk-2_60bc93a2c97228ef4815e972498edefa.RData | Bin 3274 -> 0 bytes ...ed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb | Bin 20269 -> 0 bytes ...ed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx | Bin 226 -> 0 bytes ...-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData | Bin 3144 -> 0 bytes ...ed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb | Bin 105089 -> 0 bytes ...ed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx | Bin 235 -> 0 bytes .../mkin_files/figure-html/unnamed-chunk-2-1.png | Bin 45379 -> 112161 bytes docs/articles/references.bib | 6 +- docs/index.html | 8 +-- docs/reference/Extract.mmkin.html | 26 ++++---- docs/reference/add_err.html | 4 +- docs/reference/endpoints.html | 4 +- docs/reference/ilr.html | 2 +- docs/reference/mccall81_245T.html | 12 ++-- docs/reference/mkin_long_to_wide.html | 8 +-- docs/reference/mkin_wide_to_long.html | 4 +- docs/reference/mkinfit.html | 50 +++++++------- docs/reference/mkinpredict.html | 12 ++-- docs/reference/mkinsub.html | 8 +-- docs/reference/mmkin.html | 4 +- docs/reference/plot.mkinfit.html | 14 ++-- docs/reference/plot.mmkin.html | 4 +- docs/reference/summary.mkinfit.html | 8 +-- docs/reference/transform_odeparms.html | 26 ++++---- 79 files changed, 322 insertions(+), 250 deletions(-) create mode 100644 docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RData create mode 100644 docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx create mode 100644 docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RData create mode 100644 docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdx create mode 100644 docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RData create mode 100644 docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdx create mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData create mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb delete mode 100644 docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx create mode 100644 docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData create mode 100644 docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx create mode 100644 docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData create mode 100644 docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb create mode 100644 docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx create mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData create mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb create mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RData delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb delete mode 100644 docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx (limited to 'docs') diff --git a/docs/articles/FOCUS_D.R b/docs/articles/FOCUS_D.R index c3881e80..9eaf41f7 100644 --- a/docs/articles/FOCUS_D.R +++ b/docs/articles/FOCUS_D.R @@ -2,23 +2,3 @@ library(knitr) opts_chunk$set(tidy = FALSE, cache = TRUE) -## ----data---------------------------------------------------------------- -library("mkin") -print(FOCUS_2006_D) - -## ----model--------------------------------------------------------------- -SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) -print(SFO_SFO$diffs) - -## ----fit----------------------------------------------------------------- -fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) - -## ----plot, fig.height = 5------------------------------------------------ -plot(fit, show_residuals = TRUE) - -## ----plot_2, fig.height = 4---------------------------------------------- -mkinparplot(fit) - -## ------------------------------------------------------------------------ -summary(fit) - diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 1c4edbd0..776e1093 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -41,7 +41,7 @@

Example evaluation of FOCUS Example Dataset D

Johannes Ranke

-

2016-11-04

+

2016-11-17

@@ -106,12 +106,12 @@ ## "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)
-

A plot of the fit including a residual plot for both observed variables is obtained using the plot method for mkinfit objects.

-
plot(fit, show_residuals = 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"))
+

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

mkinparplot(fit)
-

+

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

summary(fit)
## mkin version:    0.9.44.9000 
diff --git a/docs/articles/FOCUS_D_cache/html/__packages b/docs/articles/FOCUS_D_cache/html/__packages
index 8042c1f3..f8bbf624 100644
--- a/docs/articles/FOCUS_D_cache/html/__packages
+++ b/docs/articles/FOCUS_D_cache/html/__packages
@@ -1,8 +1,12 @@
 base
+colorout
+setwidth
+nvimcom
 minpack.lm
 rootSolve
 inline
 mkin
+rmarkdown
 knitr
 microbenchmark
 ggplot2
diff --git a/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RData b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RData
new file mode 100644
index 00000000..f338ef34
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb
new file mode 100644
index 00000000..e69de29b
diff --git a/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx
new file mode 100644
index 00000000..20f10d9f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx differ
diff --git a/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RData b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RData
new file mode 100644
index 00000000..8c2535e9
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdb b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdb
new file mode 100644
index 00000000..91f5819c
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdb differ
diff --git a/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdx b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdx
new file mode 100644
index 00000000..e56a127f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdx differ
diff --git a/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RData b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RData
new file mode 100644
index 00000000..4ebde526
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdb b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdb
new file mode 100644
index 00000000..f7dd80c1
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdb differ
diff --git a/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdx b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdx
new file mode 100644
index 00000000..583dc40b
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdx differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData
new file mode 100644
index 00000000..b1195f70
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb
new file mode 100644
index 00000000..e69de29b
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx
new file mode 100644
index 00000000..20f10d9f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData b/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData
deleted file mode 100644
index 8637b712..00000000
Binary files a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData and /dev/null differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb b/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx b/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx
deleted file mode 100644
index 20f10d9f..00000000
Binary files a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx and /dev/null differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData b/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData
deleted file mode 100644
index ac6cd420..00000000
Binary files a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData and /dev/null differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb b/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb
deleted file mode 100644
index e69de29b..00000000
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx b/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx
deleted file mode 100644
index 20f10d9f..00000000
Binary files a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx and /dev/null differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData
new file mode 100644
index 00000000..e559f15f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb
new file mode 100644
index 00000000..e69de29b
diff --git a/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx
new file mode 100644
index 00000000..20f10d9f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx differ
diff --git a/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData
new file mode 100644
index 00000000..03aae95c
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData differ
diff --git a/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb
new file mode 100644
index 00000000..e69de29b
diff --git a/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx
new file mode 100644
index 00000000..20f10d9f
Binary files /dev/null and b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx differ
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 c0b0c2db..fc237898 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 6700e527..b0a7c26b 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.R b/docs/articles/FOCUS_L.R
index 858d483e..063e3d57 100644
--- a/docs/articles/FOCUS_L.R
+++ b/docs/articles/FOCUS_L.R
@@ -1,3 +1,50 @@
+## ---- include = FALSE----------------------------------------------------
+library(knitr)
+opts_chunk$set(tidy = FALSE, cache = FALSE)
+
+## ------------------------------------------------------------------------
+library("mkin", quietly = TRUE)
+FOCUS_2006_L1 = data.frame(
+  t = rep(c(0, 1, 2, 3, 5, 7, 14, 21, 30), each = 2),
+  parent = c(88.3, 91.4, 85.6, 84.5, 78.9, 77.6,
+             72.0, 71.9, 50.3, 59.4, 47.0, 45.1,
+             27.7, 27.3, 10.0, 10.4, 2.9, 4.0))
+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)
+
+## ----fig.width = 6, fig.height = 5---------------------------------------
+plot(m.L1.SFO, show_errmin = TRUE, main = "FOCUS L1 - SFO")
+
+## ----fig.width = 6, fig.height = 5---------------------------------------
+mkinresplot(m.L1.SFO, ylab = "Observed", xlab = "Time")
+
+## ----fig.width = 6, fig.height = 5---------------------------------------
+m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
+plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")
+summary(m.L1.FOMC, data = FALSE)
+
+## ------------------------------------------------------------------------
+FOCUS_2006_L2 = data.frame(
+  t = rep(c(0, 1, 3, 7, 14, 28), each = 2),
+  parent = c(96.1, 91.8, 41.4, 38.7,
+             19.3, 22.3, 4.6, 4.6,
+             2.6, 1.2, 0.3, 0.6))
+FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2)
+
+## ----fig.width = 7, fig.height = 6---------------------------------------
+m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE)
+plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE,
+     main = "FOCUS L2 - SFO")
+
+## ----fig.width = 7, fig.height = 6---------------------------------------
+m.L2.FOMC <- mkinfit("FOMC", FOCUS_2006_L2_mkin, quiet = TRUE)
+plot(m.L2.FOMC, show_residuals = TRUE,
+     main = "FOCUS L2 - FOMC")
+summary(m.L2.FOMC, data = FALSE)
+
 ## ----fig.width = 7, fig.height = 6---------------------------------------
 m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, quiet = TRUE)
 plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
@@ -29,7 +76,7 @@ FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4)
 ## ----fig.height = 6------------------------------------------------------
 # Only use one core here, not to offend the CRAN checks
 mm.L4 <- mmkin(c("SFO", "FOMC"), cores = 1,
-               list("FOCUS L4" = FOCUS_2006_L4_mkin), 
+               list("FOCUS L4" = FOCUS_2006_L4_mkin),
                quiet = TRUE)
 plot(mm.L4)
 
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 4c3e5c9b..e7ec5308 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -41,7 +41,7 @@
       

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

2016-11-04

+

2016-11-17

@@ -53,7 +53,7 @@
library("mkin", quietly = TRUE)
 FOCUS_2006_L1 = data.frame(
   t = rep(c(0, 1, 2, 3, 5, 7, 14, 21, 30), each = 2),
-  parent = c(88.3, 91.4, 85.6, 84.5, 78.9, 77.6, 
+  parent = c(88.3, 91.4, 85.6, 84.5, 78.9, 77.6,
              72.0, 71.9, 50.3, 59.4, 47.0, 45.1,
              27.7, 27.3, 10.0, 10.4, 2.9, 4.0))
 FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1)
@@ -63,15 +63,15 @@ FOCUS_2006_L1_mkin <- summary(m.L1.SFO)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:13:56 2016 
-## Date of summary: Fri Nov  4 17:13:56 2016 
+## Date of fit:     Thu Nov 17 22:58:18 2016 
+## Date of summary: Thu Nov 17 22:58:18 2016 
 ## 
 ## Equations:
-## d_parent = - k_parent_sink * parent
+## d_parent/dt = - 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.103 s
 ## 
 ## Weighting: none
 ## 
@@ -156,8 +156,8 @@ FOCUS_2006_L1_mkin <- 
summary(m.L1.FOMC, data = FALSE)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:13:57 2016 
-## Date of summary: Fri Nov  4 17:13:57 2016 
+## Date of fit:     Thu Nov 17 22:58:19 2016 
+## Date of summary: Thu Nov 17 22:58:19 2016 
 ## 
 ## 
 ## Warning: Optimisation by method Port did not converge.
@@ -165,11 +165,11 @@ FOCUS_2006_L1_mkin <-  \(\chi^2\) error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters log_alpha and log_beta internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of alpha and beta. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of log_alpha and log_beta is 1.000, clearly indicating that the model is overparameterised.

-

The \(\chi^2\) error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same \(\chi^2\) error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of \(\chi^2\) error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt (Ranke, n.d.).

+

The \(\chi^2\) error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same \(\chi^2\) error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of \(\chi^2\) error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt (Ranke 2014).

Laboratory Data L2

@@ -236,7 +236,7 @@ FOCUS_2006_L2_mkin <- SFO fit for L2

Again, the SFO model is fitted and the result is plotted. The residual plot can be obtained simply by adding the argument show_residuals to the plot command.

m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE)
-plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE, 
+plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - SFO")

The \(\chi^2\) error level of 14% suggests that the model does not fit very well. This is also obvious from the plots of the fit, in which we have included the residual plot.

@@ -253,15 +253,15 @@ FOCUS_2006_L2_mkin <-
summary(m.L2.FOMC, data = FALSE)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:13:58 2016 
-## Date of summary: Fri Nov  4 17:13:58 2016 
+## Date of fit:     Thu Nov 17 22:58:20 2016 
+## Date of summary: Thu Nov 17 22:58:20 2016 
 ## 
 ## Equations:
-## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
+## 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.194 s
+## Fitted with method Port using 81 model solutions performed in 0.195 s
 ## 
 ## Weighting: none
 ## 
@@ -323,17 +323,17 @@ FOCUS_2006_L2_mkin <- 
summary(m.L2.DFOP, data = FALSE)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:13:59 2016 
-## Date of summary: Fri Nov  4 17:13:59 2016 
+## Date of fit:     Thu Nov 17 22:58:21 2016 
+## Date of summary: Thu Nov 17 22:58:21 2016 
 ## 
 ## Equations:
-## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
-##            time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 *
-##            time))) * parent
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
+##            exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
+##            exp(-k2 * time))) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 0.82 s
+## Fitted with method Port using 336 model solutions performed in 0.882 s
 ## 
 ## Weighting: none
 ## 
@@ -412,17 +412,17 @@ mm.L3 <- 
summary(mm.L3[["DFOP", 1]])
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:14:00 2016 
-## Date of summary: Fri Nov  4 17:14:00 2016 
+## Date of fit:     Thu Nov 17 22:58:22 2016 
+## Date of summary: Thu Nov 17 22:58:22 2016 
 ## 
 ## Equations:
-## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
-##            time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 *
-##            time))) * parent
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
+##            exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
+##            exp(-k2 * time))) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 137 model solutions performed in 0.336 s
+## Fitted with method Port using 137 model solutions performed in 0.338 s
 ## 
 ## Weighting: none
 ## 
@@ -504,7 +504,7 @@ FOCUS_2006_L4_mkin <- 
# Only use one core here, not to offend the CRAN checks
 mm.L4 <- mmkin(c("SFO", "FOMC"), cores = 1,
-               list("FOCUS L4" = FOCUS_2006_L4_mkin), 
+               list("FOCUS L4" = FOCUS_2006_L4_mkin),
                quiet = TRUE)
 plot(mm.L4)

@@ -512,11 +512,11 @@ mm.L4 <-
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:14:01 2016 
-## Date of summary: Fri Nov  4 17:14:01 2016 
+## Date of fit:     Thu Nov 17 22:58:22 2016 
+## Date of summary: Thu Nov 17 22:58:23 2016 
 ## 
 ## Equations:
-## d_parent = - k_parent_sink * parent
+## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
@@ -572,15 +572,15 @@ mm.L4 <- 
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version:    0.9.44.9000 
 ## R version:       3.3.2 
-## Date of fit:     Fri Nov  4 17:14:01 2016 
-## Date of summary: Fri Nov  4 17:14:01 2016 
+## Date of fit:     Thu Nov 17 22:58:23 2016 
+## Date of summary: Thu Nov 17 22:58:23 2016 
 ## 
 ## Equations:
-## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
+## 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.162 s
+## Fitted with method Port using 66 model solutions performed in 0.151 s
 ## 
 ## Weighting: none
 ## 
@@ -635,7 +635,7 @@ mm.L4 <-  References
 
-

Ranke, Johannes. n.d. “Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.” Umweltbundesamt Projektnummer 27452.

+

Ranke, Johannes. 2014. “Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.” Umweltbundesamt Projektnummer 27452.

diff --git a/docs/articles/FOCUS_Z.R b/docs/articles/FOCUS_Z.R index 5fc8f123..5c70b57e 100644 --- a/docs/articles/FOCUS_Z.R +++ b/docs/articles/FOCUS_Z.R @@ -1,3 +1,25 @@ +## ----include=FALSE-------------------------------------------------- +require(knitr) +opts_chunk$set(engine='R', tidy = FALSE, cache = TRUE) +options(width=70) + +## ----FOCUS_2006_Z_data, echo=TRUE, eval=TRUE------------------------ +require(mkin) +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, + 42, 61, 96, 124), + Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, + 2.9, 3.5, 5.3, 4.4, 1.2, 0.7), + Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, + 1.6, 0.6, 0.5 * LOD, NA, NA, NA), + Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, + 0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA), + Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, + 25.2, 17.2, 4.8, 4.5, 2.8, 4.4)) + +FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z) + ## ----FOCUS_2006_Z_fits_1, echo=TRUE, fig.height=6------------------- Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"), Z1 = mkinsub("SFO")) @@ -32,9 +54,9 @@ plot_sep(m.Z.5) Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO"), + Z3 = mkinsub("SFO"), use_of_ff = "max") -m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, +m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, quiet = TRUE) plot_sep(m.Z.FOCUS) @@ -62,7 +84,7 @@ Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), Z3 = mkinsub("SFO")) -m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, +m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.3$bparms.ode, quiet = TRUE) plot_sep(m.Z.mkin.4) @@ -72,13 +94,13 @@ Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), Z3 = mkinsub("SFORB")) -m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, +m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.4$bparms.ode[1:4], quiet = TRUE) plot_sep(m.Z.mkin.5) ## ----FOCUS_2006_Z_fits_11a, echo=TRUE------------------------------- -m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, +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), fixed_parms = "k_Z3_bound_free", diff --git a/docs/articles/FOCUS_Z.Rnw b/docs/articles/FOCUS_Z.Rnw index 5a66db24..5abda0e1 100644 --- a/docs/articles/FOCUS_Z.Rnw +++ b/docs/articles/FOCUS_Z.Rnw @@ -3,7 +3,7 @@ \documentclass[12pt,a4paper]{article} \usepackage{a4wide} \input{header} -\hypersetup{ +\hypersetup{ pdftitle = {Example evaluation of FOCUS dataset Z}, pdfsubject = {Manuscript}, pdfauthor = {Johannes Ranke}, @@ -50,15 +50,15 @@ report \citep{FOCUSkinetics2011}, p.350. require(mkin) 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, + t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21, 42, 61, 96, 124), - Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, + Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, 2.9, 3.5, 5.3, 4.4, 1.2, 0.7), - Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, + Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, 1.6, 0.6, 0.5 * LOD, NA, NA, NA), - Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, + Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, 0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA), - Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, + Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, 25.2, 17.2, 4.8, 4.5, 2.8, 4.4)) FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z) @@ -66,9 +66,9 @@ FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z) \section{Parent compound and one metabolite} -The next step is to set up the models used for the kinetic analysis. As the +The next step is to set up the models used for the kinetic analysis. As the simultaneous fit of parent and the first metabolite is usually straightforward, -Step 1 (SFO for parent only) is skipped here. We start with the model 2a, +Step 1 (SFO for parent only) is skipped here. We start with the model 2a, with formation and decline of metabolite Z1 and the pathway from parent directly to sink included (default in mkin). @@ -80,15 +80,15 @@ plot_sep(m.Z.2a) summary(m.Z.2a, data = FALSE)$bpar @ -As obvious from the parameter summary (the \texttt{bpar} component of the +As obvious from the parameter summary (the \texttt{bpar} component of the summary), the kinetic rate constant from parent compound Z to sink -is negligible. Accordingly, the exact magnitude of the fitted parameter +is negligible. Accordingly, the exact magnitude of the fitted parameter \texttt{log k\_Z0\_sink} is ill-defined and the covariance matrix is not -returned (not shown, would be visible in the complete summary). +returned (not shown, would be visible in the complete summary). This suggests, in agreement with the analysis in the FOCUS kinetics report, to simplify the model by removing the pathway to sink. -A similar result can be obtained when formation fractions are used in the model +A similar result can be obtained when formation fractions are used in the model formulation: <>= @@ -104,16 +104,16 @@ summary(m.Z.2a.ff, data = FALSE)$bpar Here, the ilr transformed formation fraction fitted in the model takes a very large value, and the backtransformed formation fraction from parent Z to Z1 is practically unity. Again, the covariance matrix is not returned as the model is -overparameterised. +overparameterised. The simplified model is obtained by setting the list component \texttt{sink} to \texttt{FALSE}.\footnote{If the model formulation without formation fractions is used, the same effect can be obtained by fixing the parameter \texttt{k\_Z\_sink} -to a value of zero.} +to a value of zero.} In the following, we use the parameterisation with formation fractions in order -to be able to compare with the results in the FOCUS guidance, and as it -makes it easier to use parameters obtained in a previous fit when adding a further +to be able to compare with the results in the FOCUS guidance, and as it +makes it easier to use parameters obtained in a previous fit when adding a further metabolite. <>= @@ -130,10 +130,10 @@ to sink, the formation fraction is internally fixed to unity. \section{Including metabolites Z2 and Z3} As suggested in the FOCUS report, the pathway to sink was removed for metabolite Z1 as -well in the next step. While this step appears questionable on the basis of the above results, it -is followed here for the purpose of comparison. Also, in the FOCUS report, it is +well in the next step. While this step appears questionable on the basis of the above results, it +is followed here for the purpose of comparison. Also, in the FOCUS report, it is assumed that there is additional empirical evidence that Z1 quickly and exclusively -hydrolyses to Z2. +hydrolyses to Z2. <>= Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), @@ -151,9 +151,9 @@ accelerate the optimization. Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO"), + Z3 = mkinsub("SFO"), use_of_ff = "max") -m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, +m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, quiet = TRUE) plot_sep(m.Z.FOCUS) @@ -167,13 +167,13 @@ transformed parameters, however. \section{Using the SFORB model for parent and metabolites} -As the FOCUS report states, there is a certain tailing of the time course of metabolite -Z3. Also, the time course of the parent compound is not fitted very well using the +As the FOCUS report states, there is a certain tailing of the time course of metabolite +Z3. Also, the time course of the parent compound is not fitted very well using the SFO model, as residues at a certain low level remain. -Therefore, an additional model is offered here, using the single first-order +Therefore, an additional model is offered here, using the single first-order reversible binding (SFORB) model for metabolite Z3. As expected, the $\chi^2$ -error level is lower for metabolite Z3 using this model and the graphical +error level is lower for metabolite Z3 using this model and the graphical fit for Z3 is improved. However, the covariance matrix is not returned. <>= @@ -198,7 +198,7 @@ m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE) plot_sep(m.Z.mkin.3) @ -This results in a much better representation of the behaviour of the parent +This results in a much better representation of the behaviour of the parent compound Z0. Finally, Z3 is added as well. These models appear overparameterised (no @@ -209,7 +209,7 @@ Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), Z3 = mkinsub("SFO")) -m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, +m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.3$bparms.ode, quiet = TRUE) plot_sep(m.Z.mkin.4) @@ -224,7 +224,7 @@ Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), Z1 = mkinsub("SFO", "Z2", sink = FALSE), Z2 = mkinsub("SFO", "Z3"), Z3 = mkinsub("SFORB")) -m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, +m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.4$bparms.ode[1:4], quiet = TRUE) plot_sep(m.Z.mkin.5) @@ -233,10 +233,10 @@ plot_sep(m.Z.mkin.5) The summary view of the backtransformed parameters shows that we get no confidence intervals due to overparameterisation. As the optimized \texttt{k\_Z3\_bound\_free} is excessively small, it seems reasonable to fix it to -zero. +zero. <>= -m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, +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), fixed_parms = "k_Z3_bound_free", @@ -244,7 +244,7 @@ m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, plot_sep(m.Z.mkin.5a) @ -As expected, the residual plots for Z0 and Z3 are more random than in the case of the +As expected, the residual plots for Z0 and Z3 are more random than in the case of the all SFO model for which they were shown above. In conclusion, the model \texttt{Z.mkin.5a} is proposed as the best-fit model for the dataset from Appendix 7 of the FOCUS report. @@ -261,8 +261,8 @@ The endpoints obtained with this model are endpoints(m.Z.mkin.5a) @ -It is clear the degradation rate of Z3 towards the end of the experiment -is very low as DT50\_Z3\_b2 (the second Eigenvalue of the system of two differential +It is clear the degradation rate of Z3 towards the end of the experiment +is very low as DT50\_Z3\_b2 (the second Eigenvalue of the system of two differential equations representing the SFORB system for Z3, corresponding to the slower rate constant of the DFOP model) is reported to be infinity. However, this appears to be a feature of the data. diff --git a/docs/articles/FOCUS_Z.pdf b/docs/articles/FOCUS_Z.pdf index 6f71d018..6f8929ea 100644 Binary files a/docs/articles/FOCUS_Z.pdf and b/docs/articles/FOCUS_Z.pdf differ diff --git a/docs/articles/compiled_models.R b/docs/articles/compiled_models.R index 5ce343cb..dd450e0d 100644 --- a/docs/articles/compiled_models.R +++ b/docs/articles/compiled_models.R @@ -15,12 +15,12 @@ SFO_SFO <- mkinmod( library("microbenchmark") library("ggplot2") mb.1 <- microbenchmark( - "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, - solution_type = "deSolve", + "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, + solution_type = "deSolve", use_compiled = FALSE, quiet = TRUE), - "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D, + "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE), - "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, + "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE), times = 3, control = list(warmup = 0)) @@ -38,7 +38,7 @@ FOMC_SFO <- mkinmod( m1 = mkinsub( "SFO")) mb.2 <- microbenchmark( - "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, + "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, use_compiled = FALSE, quiet = TRUE), "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE), times = 3, control = list(warmup = 0)) diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html index 153841ae..1446a357 100644 --- a/docs/articles/compiled_models.html +++ b/docs/articles/compiled_models.html @@ -41,7 +41,7 @@

Performance benefit by using compiled model definitions in mkin

Johannes Ranke

-

2016-11-04

+

2016-11-17

@@ -63,12 +63,12 @@ SFO_SFO <-
library("microbenchmark")
 library("ggplot2")
 mb.1 <- microbenchmark(
-  "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, 
-                                    solution_type = "deSolve", 
+  "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
+                                    solution_type = "deSolve",
                                     use_compiled = FALSE, quiet = TRUE),
-  "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D, 
+  "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D,
                                solution_type = "eigen", quiet = TRUE),
-  "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, 
+  "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D,
                                 solution_type = "deSolve", quiet = TRUE),
   times = 3, control = list(warmup = 0))
## Warning in microbenchmark(`deSolve, not compiled` = mkinfit(SFO_SFO,
@@ -78,21 +78,21 @@ mb.1 <- micr
 print(mb.1)
## Unit: milliseconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 6282.2220 6293.7637 6323.0479 6305.3053 6343.4608
-##       Eigenvalue based  873.2553  886.5949  903.6178  899.9345  918.7990
-##      deSolve, compiled  737.7899  738.8794  752.3343  739.9689  759.6065
+##  deSolve, not compiled 6251.2433 6291.2435 6315.5160 6331.2438 6347.6524
+##       Eigenvalue based  858.2035  903.1770  926.2132  948.1505  960.2181
+##      deSolve, compiled  721.0067  739.1361  745.9964  757.2656  758.4913
 ##        max neval cld
-##  6381.6162     3   c
-##   937.6634     3  b 
-##   779.2441     3 a
+## 6364.0611 3 c +## 972.2856 3 b +## 759.7171 3 a
autoplot(mb.1)

-

We see that using the compiled model is by a factor of 8.5 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

+

We see that using the compiled model is by a factor of 8.4 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

rownames(smb.1) <- smb.1$expr
 smb.1["median"]/smb.1["deSolve, compiled", "median"]
##                         median
-## deSolve, not compiled 8.521041
-## Eigenvalue based      1.216179
+## deSolve, not compiled 8.360665
+## Eigenvalue based      1.252071
 ## deSolve, compiled     1.000000
@@ -103,7 +103,7 @@ smb.1["median"]/smbm1 = mkinsub( "SFO"))
## Successfully compiled differential equation model from auto-generated C code.
mb.2 <- microbenchmark(
-  "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, 
+  "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D,
                                     use_compiled = FALSE, quiet = TRUE),
   "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
   times = 3, control = list(warmup = 0))
@@ -114,18 +114,18 @@ smb.1["median"]/smbprint(mb.2)
## Unit: seconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 13.644880 13.648332 13.835874 13.651784 13.931372
-##      deSolve, compiled  1.422381  1.448574  1.495091  1.474767  1.531446
-##        max neval cld
-##  14.210959     3   b
-##   1.588125     3  a
+## deSolve, not compiled 13.601046 13.602861 13.619563 13.604676 13.628821 +## deSolve, compiled 1.341581 1.346263 1.348298 1.350944 1.351657 +## max neval cld +## 13.65297 3 b +## 1.35237 3 a
smb.2["median"]/smb.2["deSolve, compiled", "median"]
##   median
 ## 1     NA
 ## 2     NA
autoplot(mb.2)

-

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

+

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

This vignette was built with mkin 0.9.44.9000 on

## R version 3.3.2 (2016-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png
index c52ccd5d..3c3b9c54 100644
Binary files a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png and b/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png differ
diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png
index c89ef9a5..0ec027f1 100644
Binary files a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png and b/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf
index f2bb6c87..6f5cbd2a 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf
index 7fbe61ce..a2d3e91e 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf
index 70067288..9a88c84b 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf
index f5569149..eda22e28 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf
index 1cfcf140..be61a972 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf
index 0eae0fb7..25616330 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf
index 0071dab6..ccb8e23a 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf
index 093be7dd..9d0949cd 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf
index c27fc978..020a1ccd 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf
index dc07202b..a34809c8 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf differ
diff --git a/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf b/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf
index 1580ad3b..26c4ff9d 100644
Binary files a/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf and b/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf differ
diff --git a/docs/articles/mkin.R b/docs/articles/mkin.R
index 175bd33b..67dc3623 100644
--- a/docs/articles/mkin.R
+++ b/docs/articles/mkin.R
@@ -1,22 +1,34 @@
+## ---- include = FALSE----------------------------------------------------
+require(knitr)
+opts_chunk$set(engine='R', tidy=FALSE)
+
 ## ---- echo = TRUE, cache = TRUE, fig = TRUE, fig.width = 8, fig.height = 7----
-require(mkin)
+library(mkin)
+# Define the kinetic model
 m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
                          M1 = mkinsub("SFO", "M2"),
-                         M2 = mkinsub("SFO"), 
+                         M2 = mkinsub("SFO"),
                          use_of_ff = "max", quiet = TRUE)
 
-sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
 
+# Produce model predictions using some arbitrary parameters
+sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
 d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO,
-  c(k_parent = 0.03, 
-    f_parent_to_M1 = 0.5, k_M1 = log(2)/100, 
+  c(k_parent = 0.03,
+    f_parent_to_M1 = 0.5, k_M1 = log(2)/100,
     f_M1_to_M2 = 0.9, k_M2 = log(2)/50),
   c(parent = 100, M1 = 0, M2 = 0),
   sampling_times)
 
-d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, function(x) 3, n = 1, seed = 123456789 )
+# Generate a dataset by adding normally distributed errors with
+# standard deviation 3, for two replicates at each sampling time
+d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2,
+                             sdfunc = function(x) 3,
+                             n = 1, seed = 123456789 )
 
+# Fit the model to the dataset
 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"))
 
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html
index 8a24352c..4eed053a 100644
--- a/docs/articles/mkin.html
+++ b/docs/articles/mkin.html
@@ -41,7 +41,7 @@
       

mkin - Kinetic evaluation of chemical degradation data

Johannes Ranke

-

2016-11-04

+

2016-11-17

@@ -51,25 +51,33 @@

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.

-
require(mkin)
+
library(mkin)
+# Define the kinetic model
 m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
                          M1 = mkinsub("SFO", "M2"),
-                         M2 = mkinsub("SFO"), 
+                         M2 = mkinsub("SFO"),
                          use_of_ff = "max", quiet = TRUE)
 
-sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
 
+# Produce model predictions using some arbitrary parameters
+sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
 d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO,
-  c(k_parent = 0.03, 
-    f_parent_to_M1 = 0.5, k_M1 = log(2)/100, 
+  c(k_parent = 0.03,
+    f_parent_to_M1 = 0.5, k_M1 = log(2)/100,
     f_M1_to_M2 = 0.9, k_M2 = log(2)/50),
   c(parent = 100, M1 = 0, M2 = 0),
   sampling_times)
 
-d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, function(x) 3, n = 1, seed = 123456789 )
+# Generate a dataset by adding normally distributed errors with
+# standard deviation 3, for two replicates at each sampling time
+d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2,
+                             sdfunc = function(x) 3,
+                             n = 1, seed = 123456789 )
 
+# Fit the model to the dataset
 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"))

@@ -129,13 +137,13 @@ f_SFO_SFO_SFO <- http://focus.jrc.ec.europa.eu/dk.

-

R Development Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. http://www.R-project.org.

+

R Development Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org.

-

Ranke, J. 2015. ‘Kinfit‘: Routines for Fitting Simple Kinetic Models to Chemical Degradation Data. http://CRAN.R-project.org/package=kinfit.

+

Ranke, J. 2015. ‘Kinfit‘: Routines for Fitting Simple Kinetic Models to Chemical Degradation Data. https://CRAN.R-project.org/package=kinfit.

-

———. 2016. ‘Mkin‘: Kinetic Evaluation of Chemical Degradation Data. http://CRAN.R-project.org/package=mkin.

+

———. 2016. ‘Mkin‘: Kinetic Evaluation of Chemical Degradation Data. https://CRAN.R-project.org/package=mkin.

Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In SETAC World 20-24 May. Berlin.

diff --git a/docs/articles/mkin_cache/html/__packages b/docs/articles/mkin_cache/html/__packages index 03ece635..ff62e6df 100644 --- a/docs/articles/mkin_cache/html/__packages +++ b/docs/articles/mkin_cache/html/__packages @@ -1,13 +1,12 @@ base -datasets -utils -grDevices -graphics -stats knitr minpack.lm rootSolve -methods inline -parallel mkin +colorout +setwidth +nvimcom +rmarkdown +microbenchmark +ggplot2 diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData new file mode 100644 index 00000000..b71faa9b Binary files /dev/null and b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb new file mode 100644 index 00000000..3745afaa Binary files /dev/null and b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx new file mode 100644 index 00000000..12116e2c Binary files /dev/null and b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RData b/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RData deleted file mode 100644 index d11ccf31..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RData and /dev/null differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb b/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb deleted file mode 100644 index 5ac4f484..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb and /dev/null differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx b/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx deleted file mode 100644 index 8983f69e..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx and /dev/null differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData b/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData deleted file mode 100644 index e52d9b7b..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData and /dev/null differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb b/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb deleted file mode 100644 index ff7ed49e..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb and /dev/null differ diff --git a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx b/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx deleted file mode 100644 index 7ec72c33..00000000 Binary files a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx and /dev/null differ diff --git a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png index 2e7e2244..d34e3805 100644 Binary files a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/references.bib b/docs/articles/references.bib index da51602f..b465f828 100644 --- a/docs/articles/references.bib +++ b/docs/articles/references.bib @@ -47,7 +47,7 @@ address = {Vienna, Austria}, year = {2016}, note = {{ISBN} 3-900051-07-0}, - url = {http://www.R-project.org} + url = {https://www.R-project.org} } @MANUAL{pkg:kinfit, @@ -55,14 +55,14 @@ degradation data}, author = {J. Ranke}, year = {2015}, - url = {http://CRAN.R-project.org/package=kinfit} + url = {https://CRAN.R-project.org/package=kinfit} } @MANUAL{pkg:mkin, title = {`mkin`: {K}inetic evaluation of chemical degradation data}, author = {J. Ranke}, year = {2016}, - url = {http://CRAN.R-project.org/package=mkin} + url = {https://CRAN.R-project.org/package=mkin} } @Inproceedings{ schaefer2007, diff --git a/docs/index.html b/docs/index.html index a3a0e46c..444b650e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -44,7 +44,7 @@

Installation

-

You can install the latest released version from CRAN from within R:

+

You can install the latest released version from CRAN from within R:

install.packages("mkin")
@@ -93,10 +93,10 @@

mkin would not be possible without the underlying software stack consisting of R and the packages deSolve and FME, to say the least.

It could not have been written without me being introduced to regulatory fate modelling of pesticides by Adrian Gurney during my time at Harlan Laboratories Ltd (formerly RCC Ltd). mkin greatly profits from and largely follows the work done by the FOCUS Degradation Kinetics Workgroup, as detailed in their guidance document from 2006, slightly updated in 2011 and in 2014.

Also, it was inspired by the first version of KinGUI developed by BayerCropScience, which is based on the MatLab runtime environment.

-

The companion package kinfit (now deprecated) was started in 2008 and first published on CRAN on 01 May 2010.

+

The companion package kinfit (now deprecated) was started in 2008 and first published on CRAN on 01 May 2010.

The first mkin code was published on 11 May 2010 and the first CRAN version on 18 May 2010.

In 2011, Bayer Crop Science started to distribute an R based successor to KinGUI named KinGUII whose R code is based on mkin, but which added, amongst other refinements, a closed source graphical user interface (GUI), iteratively reweighted least squares (IRLS) optimisation of the variance for each of the observed variables, and Markov Chain Monte Carlo (MCMC) simulation functionality, similar to what is available e.g. in the FME package.

-

Somewhat in parallel, Syngenta has sponsored the development of an mkin and KinGUII based GUI application called CAKE, which also adds IRLS and MCMC, is more limited in the model formulation, but puts more weight on usability. CAKE is available for download from the CAKE website, where you can also find a zip archive of the R scripts derived from mkin, published under the GPL license.

+

Somewhat in parallel, Syngenta has sponsored the development of an mkin and KinGUII based GUI application called CAKE, which also adds IRLS and MCMC, is more limited in the model formulation, but puts more weight on usability. CAKE is available for download from the CAKE website, where you can also find a zip archive of the R scripts derived from mkin, published under the GPL license.

Finally, there is KineticEval, which contains a further development of the scripts used for KinGUII, so the different tools will hopefully be able to learn from each other in the future as well.

@@ -115,7 +115,7 @@

GPL

Developers

Dev status

Dev status

diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 4b6545db..b437fc7d 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -98,7 +98,7 @@
...
Not used, only there to satisfy the generic method definition
drop
-
If FALSE, the method always returns an mmkin object, otherwise either +
If FALSE, the method always returns an mmkin object, otherwise either a list of mkinfit objects or a single mkinfit object.
@@ -193,7 +193,7 @@ #> #> $time #> user system elapsed -#> 0.260 0.000 0.261 +#> 0.268 0.000 0.267 #> #> $mkinmod #> <mkinmod> model generated with @@ -379,7 +379,7 @@ #> } #> return(mC) #> } -#> <environment: 0x5bbb4a8> +#> <environment: 0x3a2f9e8> #> #> $cost_notrans #> function (P) @@ -401,7 +401,7 @@ #> scaleVar = scaleVar) #> return(mC) #> } -#> <environment: 0x5bbb4a8> +#> <environment: 0x3a2f9e8> #> #> $hessian_notrans #> parent_0 alpha beta @@ -467,7 +467,7 @@ #> 99.66619 #> #> $date -#> [1] "Fri Nov 4 17:12:26 2016" +#> [1] "Thu Nov 17 22:56:49 2016" #> #> attr(,"class") #> [1] "mkinfit" "modFit"
fits["SFO", "B"]
#> dataset @@ -546,7 +546,7 @@ #> #> $time #> user system elapsed -#> 0.068 0.000 0.071 +#> 0.116 0.000 0.115 #> #> $mkinmod #> <mkinmod> model generated with @@ -733,7 +733,7 @@ #> } #> return(mC) #> } -#> <environment: 0x5719c08> +#> <environment: 0x42fb560> #> #> $cost_notrans #> function (P) @@ -755,7 +755,7 @@ #> scaleVar = scaleVar) #> return(mC) #> } -#> <environment: 0x5719c08> +#> <environment: 0x42fb560> #> #> $hessian_notrans #> parent_0 k_parent_sink @@ -818,7 +818,7 @@ #> 99.17407 #> #> $date -#> [1] "Fri Nov 4 17:12:26 2016" +#> [1] "Thu Nov 17 22:56:48 2016" #> #> attr(,"class") #> [1] "mkinfit" "modFit"
fits["SFO", "B", drop = TRUE]
#> [[1]] @@ -894,7 +894,7 @@ #> #> $time #> user system elapsed -#> 0.068 0.000 0.071 +#> 0.116 0.000 0.115 #> #> $mkinmod #> <mkinmod> model generated with @@ -1081,7 +1081,7 @@ #> } #> return(mC) #> } -#> <environment: 0x5719c08> +#> <environment: 0x42fb560> #> #> $cost_notrans #> function (P) @@ -1103,7 +1103,7 @@ #> scaleVar = scaleVar) #> return(mC) #> } -#> <environment: 0x5719c08> +#> <environment: 0x42fb560> #> #> $hessian_notrans #> parent_0 k_parent_sink @@ -1166,7 +1166,7 @@ #> 99.17407 #> #> $date -#> [1] "Fri Nov 4 17:12:26 2016" +#> [1] "Thu Nov 17 22:56:48 2016" #> #> attr(,"class") #> [1] "mkinfit" "modFit" diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index 0a126c5c..8f1e1abb 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -121,7 +121,7 @@
seed
- The seed used for the generation of random numbers. If NA, the seed + The seed used for the generation of random numbers. If NA, the seed is not set.
@@ -129,7 +129,7 @@

Value

A list of datasets compatible with mmkin, i.e. - the components of the list are datasets compatible with + the components of the list are datasets compatible with mkinfit.

References

diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index 44a8f4c4..990ceadf 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -82,8 +82,8 @@

This function calculates DT50 and DT90 values as well as formation fractions from kinetic models -fitted with mkinfit. If the SFORB model was specified for one of the parents or metabolites, -the Eigenvalues are returned. These are equivalent to the rate constantes of the DFOP model, but +fitted with mkinfit. If the SFORB model was specified for one of the parents or metabolites, +the Eigenvalues are returned. These are equivalent to the rate constantes of the DFOP model, but with the advantage that the SFORB model can also be used for metabolites.

diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index 95fed72e..1e50e216 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -98,7 +98,7 @@

Value

-

The result of the forward or backward transformation. The returned components always +

The result of the forward or backward transformation. The returned components always sum to 1 for the case of the inverse log-ratio transformation.

References

diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 40c21d3c..4314c84e 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -122,18 +122,18 @@ fixed_parms = "k_phenol_sink", quiet = TRUE) summary(fit.2, data = FALSE)
#> mkin version: 0.9.44.9000 #> R version: 3.3.2 -#> Date of fit: Fri Nov 4 17:12:32 2016 -#> Date of summary: Fri Nov 4 17:12:32 2016 +#> Date of fit: Thu Nov 17 22:56:55 2016 +#> Date of summary: Thu Nov 17 22:56:55 2016 #> #> Equations: -#> d_T245 = - k_T245_sink * T245 - k_T245_phenol * T245 -#> d_phenol = + k_T245_phenol * T245 - k_phenol_sink * phenol - +#> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 +#> d_phenol/dt = + k_T245_phenol * T245 - k_phenol_sink * phenol - #> k_phenol_anisole * phenol -#> d_anisole = + k_phenol_anisole * phenol - k_anisole_sink * anisole +#> d_anisole/dt = + k_phenol_anisole * phenol - k_anisole_sink * anisole #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 246 model solutions performed in 1.502 s +#> Fitted with method Port using 246 model solutions performed in 1.457 s #> #> Weighting: none #> diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html index fa131a6d..095468e4 100644 --- a/docs/reference/mkin_long_to_wide.html +++ b/docs/reference/mkin_long_to_wide.html @@ -81,8 +81,8 @@
-

This function takes a dataframe in the long form as required by modCost - and converts it into a dataframe with one independent variable and several +

This function takes a dataframe in the long form as required by modCost + and converts it into a dataframe with one independent variable and several dependent variables as columns.

@@ -92,8 +92,8 @@
long_data
- The dataframe must contain one variable called "time" with the time values specified by the - time argument, one column called "name" with the grouping of the observed values, and + The dataframe must contain one variable called "time" with the time values specified by the + time argument, one column called "name" with the grouping of the observed values, and finally one column of observed values called "value".
time
diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html index 077c0b7d..3b2d46e5 100644 --- a/docs/reference/mkin_wide_to_long.html +++ b/docs/reference/mkin_wide_to_long.html @@ -81,7 +81,7 @@ -

This function simply takes a dataframe with one independent variable and several +

This function simply takes a dataframe with one independent variable and several dependent variable and converts it into the long form as required by modCost.

@@ -91,7 +91,7 @@
wide_data
- The dataframe must contain one variable with the time values specified by the + The dataframe must contain one variable with the time values specified by the time argument and usually more than one column of observed values.
time
diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 32083843..891bc18b 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -82,11 +82,11 @@

This function uses the Flexible Modelling Environment package - FME to create a function calculating the model cost, i.e. the + FME to create a function calculating the model cost, i.e. the deviation between the kinetic model and the observed data. This model cost is - then minimised using the Port algorithm nlminb, + then minimised using the Port algorithm nlminb, using the specified initial or fixed parameters and starting values. - Per default, parameters in the kinetic models are internally transformed in order + Per default, parameters in the kinetic models are internally transformed in order to better satisfy the assumption of a normal distribution of their estimators. In each step of the optimsation, the kinetic model is solved using the function mkinpredict. The variance of the residuals for each @@ -200,13 +200,13 @@

use_compiled
- If set to FALSE, no compiled version of the mkinmod + If set to FALSE, no compiled version of the mkinmod model is used, in the calls to mkinpredict even if - a compiled verion is present. + a compiled verion is present.
method.modFit
- The optimisation method passed to modFit. + The optimisation method passed to modFit. In order to optimally deal with problems where local minima occur, the "Port" algorithm is now used per default as it is less prone to get trapped @@ -228,20 +228,20 @@
maxit.modFit
Maximum number of iterations in the optimisation. If not "auto", this will - be passed to the method called by modFit, overriding + be passed to the method called by modFit, overriding what may be specified in the next argument control.modFit.
control.modFit
Additional arguments passed to the optimisation method used by - modFit. + modFit.
transform_rates
Boolean specifying if kinetic rate constants should be transformed in the model specification used in the fitting for better compliance with the - assumption of normal distribution of the estimator. If TRUE, also - alpha and beta parameters of the FOMC model are log-transformed, as well + assumption of normal distribution of the estimator. If TRUE, also + alpha and beta parameters of the FOMC model are log-transformed, as well as k1 and k2 rate constants for the DFOP and HS models and the break point tb of the HS model. If FALSE, zero is used as a lower bound for the rates in the optimisation. @@ -250,7 +250,7 @@
Boolean specifying if formation fractions constants should be transformed in the model specification used in the fitting for better compliance with the - assumption of normal distribution of the estimator. The default (TRUE) is + assumption of normal distribution of the estimator. The default (TRUE) is to do transformations. If TRUE, the g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these transformations is the @@ -294,7 +294,7 @@
The length of the dataseries that is produced by the model prediction function mkinpredict. This impacts the accuracy of - the numerical solver if that is used (see solution_type argument. + the numerical solver if that is used (see solution_type argument. The default value is 100.
reweight.method
@@ -302,9 +302,9 @@ The method used for iteratively reweighting residuals, also known as iteratively reweighted least squares (IRLS). Default is NULL, the other method implemented is called "obs", meaning that each - observed variable is assumed to have its own variance, this is + observed variable is assumed to have its own variance, this is estimated from the fit and used for weighting the residuals - in each iteration until convergence of this estimate up to + in each iteration until convergence of this estimate up to reweight.tol or up to the maximum number of iterations specified by reweight.max.iter. @@ -323,20 +323,20 @@
&#8230;
- Further arguments that will be passed to modFit. + Further arguments that will be passed to modFit.

Value

-

A list with "mkinfit" and "modFit" in the class attribute. +

A list with "mkinfit" and "modFit" in the class attribute. A summary can be obtained by summary.mkinfit.

See also

Plotting methods plot.mkinfit and mkinparplot.

-

Fitting of several models to several datasets in a single call to +

Fitting of several models to several datasets in a single call to mmkin.

Note

@@ -348,7 +348,7 @@

Note

-

When using the "IORE" submodel for metabolites, fitting with +

When using the "IORE" submodel for metabolites, fitting with "transform_rates = TRUE" (the default) often leads to failures of the numerical ODE solver. In this situation it may help to switch off the internal rate transformation.

@@ -359,15 +359,15 @@ fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit)
#> mkin version: 0.9.44.9000 #> R version: 3.3.2 -#> Date of fit: Fri Nov 4 17:12:35 2016 -#> Date of summary: Fri Nov 4 17:12:35 2016 +#> Date of fit: Thu Nov 17 22:56:57 2016 +#> Date of summary: Thu Nov 17 22:56:57 2016 #> #> Equations: -#> d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent +#> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 64 model solutions performed in 0.147 s +#> Fitted with method Port using 64 model solutions performed in 0.158 s #> #> Weighting: none #> @@ -436,7 +436,7 @@ m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults print(system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE)))
#> user system elapsed -#> 1.208 1.256 0.935
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.168 1.260 0.924
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -450,7 +450,7 @@ #> m1 131.760712 437.69961 #>
## Not run: ------------------------------------ # # deSolve is slower when no C compiler (gcc) was available during model generation -# print(system.time(fit.deSolve <- mkinfit(SFO_SFO, FOCUS_2006_D, +# print(system.time(fit.deSolve <- mkinfit(SFO_SFO, FOCUS_2006_D, # solution_type = "deSolve"))) # coef(fit.deSolve) # endpoints(fit.deSolve) @@ -465,7 +465,7 @@ # fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D) # # Use starting parameters from parent only FOMC fit # fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, plot=TRUE) -# fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, +# fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, # parms.ini = fit.FOMC$bparms.ode, plot=TRUE) # # # Use stepwise fitting, using optimised parameters from parent only fit, SFORB diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index e8302508..9c78d78a 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -128,8 +128,8 @@
use_compiled
- If set to FALSE, no compiled version of the mkinmod - model is used, even if is present. + If set to FALSE, no compiled version of the mkinmod + model is used, even if is present.
atol
@@ -144,7 +144,7 @@
map_output
Boolean to specify if the output should list values for the observed - variables (default) or for all state variables (if set to FALSE). + variables (default) or for all state variables (if set to FALSE).
&#8230;
@@ -275,17 +275,17 @@ c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "eigen")[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> user system elapsed -#> 0.008 0.016 0.005
system.time( +#> 0.024 0.004 0.004
system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve")[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> user system elapsed -#> 0.000 0.016 0.002
system.time( +#> 0.016 0.004 0.003
system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve", use_compiled = FALSE)[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> user system elapsed -#> 0.036 0.000 0.035
+#> 0.032 0.000 0.035
-

This is a convenience function to set up the lists used as arguments for +

This is a convenience function to set up the lists used as arguments for mkinmod.

@@ -91,17 +91,17 @@
submodel
- Character vector of length one to specify the submodel type. See + Character vector of length one to specify the submodel type. See mkinmod for the list of allowed submodel names.
to
- Vector of the names of the state variable to which a transformation + Vector of the names of the state variable to which a transformation shall be included in the model.
sink
- Should a pathway to sink be included in the model in addition to the + Should a pathway to sink be included in the model in addition to the pathways to other state variables?
full_name
diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index a21a980b..f7f56164 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -108,12 +108,12 @@
cluster
- A cluster as returned by makeCluster to be used for parallel + A cluster as returned by makeCluster to be used for parallel execution.
&#8230;
- Further arguments that will be passed to mkinfit. + Further arguments that will be passed to mkinfit.
diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 52db9bc6..362a4eef 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -82,22 +82,22 @@

Solves the differential equations with the optimised and fixed parameters - from a previous successful call to mkinfit and plots + from a previous successful call to mkinfit and plots the observed data together with the solution of the fitted model.

# S3 method for mkinfit
 plot(x, fit = x,
   obs_vars = names(fit$mkinmod$map),
-  xlab = "Time", ylab = "Observed", 
+  xlab = "Time", ylab = "Observed",
   xlim = range(fit$data$time),
   ylim = "default",
-  col_obs = 1:length(obs_vars), pch_obs = col_obs, 
+  col_obs = 1:length(obs_vars), pch_obs = col_obs,
   lty_obs = rep(1, length(obs_vars)),
   add = FALSE, legend = !add,
   show_residuals = FALSE, maxabs = "auto",
   sep_obs = FALSE, rel.height.middle = 0.9,
-  lpos = "topright", inset = c(0.05, 0.05), 
+  lpos = "topright", inset = c(0.05, 0.05),
   show_errmin = FALSE, errmin_digits = 3, …)
 plot_sep(fit, sep_obs = TRUE,  show_residuals = TRUE, show_errmin = TRUE, …)
@@ -105,7 +105,7 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, …
x
- Alias for fit introduced for compatibility with the generic S3 method. + Alias for fit introduced for compatibility with the generic S3 method.
fit
@@ -113,7 +113,7 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, …
obs_vars
- A character vector of names of the observed variables for which the + A character vector of names of the observed variables for which the data and the model should be plotted. Defauls to all observed variables in the model.
@@ -157,7 +157,7 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, …
Should residuals be shown? If only one plot of the fits is shown, the residual plot is in the lower third of the plot? Otherwise, i.e. if - "sep_obs" is given, the residual plots will be located to the right of + "sep_obs" is given, the residual plots will be located to the right of the plots of the fitted curves.
maxabs
diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index eac31273..f171ab5b 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -82,7 +82,7 @@

When x is a row selected from an mmkin object ([.mmkin), the same model - fitted for at least one dataset is shown. When it is a column, the fit of at least one model + fitted for at least one dataset is shown. When it is a column, the fit of at least one model to the same dataset is shown.

@@ -136,7 +136,7 @@ fits <- mmkin(c("FOMC", "HS"), list("FOCUS B" = FOCUS_2006_B, "FOCUS C" = FOCUS_2006_C), cores = 1, quiet = TRUE, method.modFit = "Marq") plot(fits[, "FOCUS C"])
plot(fits["FOMC", ])
- # We can also plot a single fit, if we like the way mmkin works, but then the plot + # We can also plot a single fit, if we like the way mmkin works, but then the plot # height should be smaller than the plot width (this is not possible for the html pages # generated by staticdocs, as far as I know). plot(fits["FOMC", "FOCUS C"]) # same as plot(fits[1, 2])
diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 60f7cdf6..8dc57fb7 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -142,15 +142,15 @@

Examples

summary(mkinfit(mkinmod(parent = list(type = "SFO")), FOCUS_2006_A, quiet = TRUE))
#> mkin version: 0.9.44.9000 #> R version: 3.3.2 -#> Date of fit: Fri Nov 4 17:12:43 2016 -#> Date of summary: Fri Nov 4 17:12:43 2016 +#> Date of fit: Thu Nov 17 22:57:05 2016 +#> Date of summary: Thu Nov 17 22:57:05 2016 #> #> Equations: -#> d_parent = - k_parent_sink * parent +#> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 35 model solutions performed in 0.084 s +#> Fitted with method Port using 35 model solutions performed in 0.085 s #> #> Weighting: none #> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index f455951d..00af0267 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -81,7 +81,7 @@
-

The transformations are intended to map parameters that should only take +

The transformations are intended to map parameters that should only take on restricted values to the full scale of real numbers. For kinetic rate constants and other paramters that can only take on positive values, a simple log transformation is used. For compositional parameters, such as @@ -112,15 +112,15 @@

The kinetic model of class mkinmod, containing the names of the model variables that are needed for grouping the formation fractions - before ilr transformation, the parameter names and - the information if the pathway to sink is included in the model. + before ilr transformation, the parameter names and + the information if the pathway to sink is included in the model.
transform_rates
Boolean specifying if kinetic rate constants should be transformed in the model specification used in the fitting for better compliance with the - assumption of normal distribution of the estimator. If TRUE, also - alpha and beta parameters of the FOMC model are log-transformed, as well + assumption of normal distribution of the estimator. If TRUE, also + alpha and beta parameters of the FOMC model are log-transformed, as well as k1 and k2 rate constants for the DFOP and HS models and the break point tb of the HS model.
@@ -128,8 +128,8 @@
Boolean specifying if formation fractions constants should be transformed in the model specification used in the fitting for better compliance with the - assumption of normal distribution of the estimator. The default (TRUE) is - to do transformations. The g parameter of the DFOP and HS models are also + assumption of normal distribution of the estimator. The default (TRUE) is + to do transformations. The g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these transformations is the ilr transformation. @@ -149,16 +149,16 @@ fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) summary(fit, data=FALSE) # See transformed and backtransformed parameters
#> mkin version: 0.9.44.9000 #> R version: 3.3.2 -#> Date of fit: Fri Nov 4 17:12:44 2016 -#> Date of summary: Fri Nov 4 17:12:44 2016 +#> Date of fit: Thu Nov 17 22:57:06 2016 +#> Date of summary: Thu Nov 17 22:57:06 2016 #> #> Equations: -#> d_parent = - k_parent_sink * parent - k_parent_m1 * parent -#> d_m1 = + k_parent_m1 * parent - k_m1_sink * m1 +#> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent +#> d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1 #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 153 model solutions performed in 0.656 s +#> Fitted with method Port using 153 model solutions performed in 0.684 s #> #> Weighting: none #> @@ -224,7 +224,7 @@ #> m1 131.761 437.70
## Not run: ------------------------------------ # fit.2 <- mkinfit(SFO_SFO, FOCUS_2006_D, transform_rates = FALSE) -# summary(fit.2, data=FALSE) +# summary(fit.2, data=FALSE) ## --------------------------------------------- initials <- fit$start$value -- cgit v1.2.1