aboutsummaryrefslogtreecommitdiff
path: root/docs/articles
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-11-17 22:58:28 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2016-11-17 22:58:28 +0100
commit98d684becd9495d370e1bcc8f9c7ca758caa4dd8 (patch)
tree94c5e18f755d1c3328fad3fe517fe28b45c2df2f /docs/articles
parent3f6ce570824616f5be0d6289ed65910d455dd266 (diff)
Static documentation rebuilt by pkgdown::build_site()
Diffstat (limited to 'docs/articles')
-rw-r--r--docs/articles/FOCUS_D.R20
-rw-r--r--docs/articles/FOCUS_D.html10
-rw-r--r--docs/articles/FOCUS_D_cache/html/__packages4
-rw-r--r--docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RDatabin0 -> 3175 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb (renamed from docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb)0
-rw-r--r--docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx (renamed from docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx)bin113 -> 113 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RDatabin0 -> 2735 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdbbin0 -> 15588 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdxbin0 -> 161 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RDatabin0 -> 2927 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdbbin0 -> 1776 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdxbin0 -> 147 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData (renamed from docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData)bin2769 -> 2769 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb (renamed from docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb)0
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx (renamed from docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx)bin113 -> 113 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData (renamed from docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData)bin2781 -> 2799 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb0
-rw-r--r--docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdxbin0 -> 113 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RDatabin0 -> 4629 bytes
-rw-r--r--docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb0
-rw-r--r--docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdxbin0 -> 113 bytes
-rw-r--r--docs/articles/FOCUS_D_files/figure-html/plot-1.pngbin74304 -> 95834 bytes
-rw-r--r--docs/articles/FOCUS_D_files/figure-html/plot_2-1.pngbin13789 -> 14059 bytes
-rw-r--r--docs/articles/FOCUS_L.R49
-rw-r--r--docs/articles/FOCUS_L.html74
-rw-r--r--docs/articles/FOCUS_Z.R32
-rw-r--r--docs/articles/FOCUS_Z.Rnw66
-rw-r--r--docs/articles/FOCUS_Z.pdfbin239558 -> 239558 bytes
-rw-r--r--docs/articles/compiled_models.R10
-rw-r--r--docs/articles/compiled_models.html42
-rw-r--r--docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.pngbin10652 -> 9514 bytes
-rw-r--r--docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.pngbin11994 -> 11028 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdfbin7496 -> 7496 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdfbin11048 -> 11048 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdfbin11072 -> 11072 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdfbin10940 -> 10940 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdfbin5023 -> 5023 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdfbin7481 -> 7481 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdfbin7482 -> 7482 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdfbin9099 -> 9099 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdfbin10771 -> 10771 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdfbin10754 -> 10754 bytes
-rw-r--r--docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdfbin9392 -> 9392 bytes
-rw-r--r--docs/articles/mkin.R24
-rw-r--r--docs/articles/mkin.html28
-rw-r--r--docs/articles/mkin_cache/html/__packages13
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RDatabin0 -> 3376 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdbbin0 -> 105223 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdxbin0 -> 236 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RDatabin3274 -> 0 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdbbin20269 -> 0 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdxbin226 -> 0 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RDatabin3144 -> 0 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdbbin105089 -> 0 bytes
-rw-r--r--docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdxbin235 -> 0 bytes
-rw-r--r--docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.pngbin45379 -> 112161 bytes
-rw-r--r--docs/articles/references.bib6
57 files changed, 225 insertions, 153 deletions
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 @@
<h1>Example evaluation of FOCUS Example Dataset D</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2016-11-04</h4>
+ <h4 class="date">2016-11-17</h4>
</div>
@@ -106,12 +106,12 @@
## "d_m1 = + k_parent_m1 * parent - k_m1_sink * m1"</code></pre>
<p>We do the fitting without progress report (<code>quiet = TRUE</code>).</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">fit &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div>
-<p>A plot of the fit including a residual plot for both observed variables is obtained using the <code>plot</code> method for <code>mkinfit</code> objects.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(fit, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>)</code></pre></div>
-<p><img src="FOCUS_D_files/figure-html/plot-1.png" width="672"></p>
+<p>A plot of the fit including a residual plot for both observed variables is obtained using the <code>plot_sep</code> method for <code>mkinfit</code> objects, which shows separate graphs for all compounds and their residuals.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(fit, <span class="dt">lpos =</span> <span class="kw">c</span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>))</code></pre></div>
+<p><img src="FOCUS_D_files/figure-html/plot-1.png" width="768"></p>
<p>Confidence intervals for the parameter estimates are obtained using the <code>mkinparplot</code> function.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(fit)</code></pre></div>
-<p><img src="FOCUS_D_files/figure-html/plot_2-1.png" width="672"></p>
+<p><img src="FOCUS_D_files/figure-html/plot_2-1.png" width="768"></p>
<p>A comprehensive report of the results is obtained using the <code>summary</code> method for <code>mkinfit</code> objects.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(fit)</code></pre></div>
<pre><code>## 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.RData
Binary files differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb
index e69de29b..e69de29b 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdb
+++ b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdb
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx
index 20f10d9f..20f10d9f 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.rdx
+++ b/docs/articles/FOCUS_D_cache/html/data_7c3240ac153a7639ee517a9110a0f103.rdx
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.RData
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdb
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/fit_33941ca5d01df032930f2f38dc298a59.rdx
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.RData
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdb
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/model_7de92bef541220dbe2d2832243e35870.rdx
Binary files differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData
index 8637b712..b1195f70 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_2_3aa531f4c45b3e89e3259e0bb1cf7cf7.RData
+++ b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.RData
Binary files differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb
index e69de29b..e69de29b 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdb
+++ b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdb
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx
index 20f10d9f..20f10d9f 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.rdx
+++ b/docs/articles/FOCUS_D_cache/html/plot_2_2d898a5ad88ebcba8bdab623bfd497de.rdx
Binary files differ
diff --git a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData
index ac6cd420..e559f15f 100644
--- a/docs/articles/FOCUS_D_cache/html/plot_7873ad9c0e1495350681617620f6522d.RData
+++ b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.RData
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdb
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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/plot_a02b9c8bb9ae9921707cd87235ec2008.rdx
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.RData
Binary files 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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdb
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
--- /dev/null
+++ b/docs/articles/FOCUS_D_cache/html/unnamed-chunk-2_2c30ef6f2fb33a606bda3c2882a070ab.rdx
Binary files 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
--- a/docs/articles/FOCUS_D_files/figure-html/plot-1.png
+++ b/docs/articles/FOCUS_D_files/figure-html/plot-1.png
Binary files 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
--- a/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png
+++ b/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png
Binary files 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 @@
<h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2016-11-04</h4>
+ <h4 class="date">2016-11-17</h4>
</div>
@@ -53,7 +53,7 @@
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)
FOCUS_2006_L1 =<span class="st"> </span><span class="kw">data.frame</span>(
<span class="dt">t =</span> <span class="kw">rep</span>(<span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">5</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">21</span>, <span class="dv">30</span>), <span class="dt">each =</span> <span class="dv">2</span>),
- <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">88.3</span>, <span class="fl">91.4</span>, <span class="fl">85.6</span>, <span class="fl">84.5</span>, <span class="fl">78.9</span>, <span class="fl">77.6</span>,
+ <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">88.3</span>, <span class="fl">91.4</span>, <span class="fl">85.6</span>, <span class="fl">84.5</span>, <span class="fl">78.9</span>, <span class="fl">77.6</span>,
<span class="fl">72.0</span>, <span class="fl">71.9</span>, <span class="fl">50.3</span>, <span class="fl">59.4</span>, <span class="fl">47.0</span>, <span class="fl">45.1</span>,
<span class="fl">27.7</span>, <span class="fl">27.3</span>, <span class="fl">10.0</span>, <span class="fl">10.4</span>, <span class="fl">2.9</span>, <span class="fl">4.0</span>))
FOCUS_2006_L1_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_L1)</code></pre></div>
@@ -63,15 +63,15 @@ FOCUS_2006_L1_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../re
<span class="kw">summary</span>(m.L1.SFO)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../re
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../re
##
##
## 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 188 model solutions performed in 0.444 s
+## Fitted with method Port using 188 model solutions performed in 0.462 s
##
## Weighting: none
##
@@ -221,7 +221,7 @@ FOCUS_2006_L1_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../re
## parent 7.25 24.08 7.25</code></pre>
<p>We get a warning that the default optimisation algorithm <code>Port</code> did not converge, which is an indication that the model is overparameterised, <em>i.e.</em> contains too many parameters that are ill-defined as a consequence.</p>
<p>And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the <span class="math inline">\(\chi^2\)</span> error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters <code>log_alpha</code> and <code>log_beta</code> internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of <code>alpha</code> and <code>beta</code>. 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 <code>log_alpha</code> and <code>log_beta</code> is 1.000, clearly indicating that the model is overparameterised.</p>
-<p>The <span class="math inline">\(\chi^2\)</span> 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 <span class="math inline">\(\chi^2\)</span> 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 <span class="math inline">\(\chi^2\)</span> error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt <span class="citation">(Ranke, n.d.)</span>.</p>
+<p>The <span class="math inline">\(\chi^2\)</span> 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 <span class="math inline">\(\chi^2\)</span> 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 <span class="math inline">\(\chi^2\)</span> error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt <span class="citation">(Ranke 2014)</span>.</p>
</div>
<div id="laboratory-data-l2" class="section level1">
<h1 class="hasAnchor"><html><body><a href="#laboratory-data-l2" class="anchor"> </a></body></html>Laboratory Data L2</h1>
@@ -236,7 +236,7 @@ FOCUS_2006_L2_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../re
<h2 class="hasAnchor"><html><body><a href="#sfo-fit-for-l2" class="anchor"> </a></body></html>SFO fit for L2</h2>
<p>Again, the SFO model is fitted and the result is plotted. The residual plot can be obtained simply by adding the argument <code>show_residuals</code> to the plot command.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_2006_L2_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>)
-<span class="kw">plot</span>(m.L2.SFO, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>,
+<span class="kw">plot</span>(m.L2.SFO, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>,
<span class="dt">main =</span> <span class="st">"FOCUS L2 - SFO"</span>)</code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-8-1.png" width="672"></p>
<p>The <span class="math inline">\(\chi^2\)</span> 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.</p>
@@ -253,15 +253,15 @@ FOCUS_2006_L2_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../re
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../re
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../re
<p>Fits of the SFO and FOMC models, plots and summaries are produced below:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Only use one core here, not to offend the CRAN checks</span>
mm.L4 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="kw">c</span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>), <span class="dt">cores =</span> <span class="dv">1</span>,
- <span class="kw">list</span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_2006_L4_mkin),
+ <span class="kw">list</span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_2006_L4_mkin),
<span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw">plot</span>(mm.L4)</code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-15-1.png" width="672"></p>
@@ -512,11 +512,11 @@ mm.L4 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"SFO"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"FOMC"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div>
<pre><code>## 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 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<h1 class="hasAnchor"><html><body><a href="#references" class="anchor"> </a></body></html>References</h1>
<div id="refs" class="references">
<div id="ref-ranke2014">
-<p>Ranke, Johannes. n.d. &ldquo;Pr&uuml;fung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.&rdquo; Umweltbundesamt Projektnummer 27452.</p>
+<p>Ranke, Johannes. 2014. &ldquo;Pr&uuml;fung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.&rdquo; Umweltbundesamt Projektnummer 27452.</p>
</div>
</div>
</div>
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:
<<FOCUS_2006_Z_fits_2, echo=TRUE, fig.height=6>>=
@@ -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.
<<FOCUS_2006_Z_fits_3, echo=TRUE, fig.height=6>>=
@@ -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.
<<FOCUS_2006_Z_fits_5, echo=TRUE, fig.height=7>>=
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.
<<FOCUS_2006_Z_fits_7, echo=TRUE, fig.height=8>>=
@@ -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.
<<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",
@@ -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
--- a/docs/articles/FOCUS_Z.pdf
+++ b/docs/articles/FOCUS_Z.pdf
Binary files 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 @@
<h1>Performance benefit by using compiled model definitions in mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2016-11-04</h4>
+ <h4 class="date">2016-11-17</h4>
</div>
@@ -63,12 +63,12 @@ SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mki
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(<span class="st">"microbenchmark"</span>)
<span class="kw">library</span>(<span class="st">"ggplot2"</span>)
mb<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw">microbenchmark</span>(
- <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
- <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>,
+ <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
+ <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>,
<span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
- <span class="st">"Eigenvalue based"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
+ <span class="st">"Eigenvalue based"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
<span class="dt">solution_type =</span> <span class="st">"eigen"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
- <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
+ <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D,
<span class="dt">solution_type =</span> <span class="st">"deSolve"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
<span class="dt">times =</span> <span class="dv">3</span>, <span class="dt">control =</span> <span class="kw">list</span>(<span class="dt">warmup =</span> <span class="dv">0</span>))</code></pre></div>
<pre><code>## Warning in microbenchmark(`deSolve, not compiled` = mkinfit(SFO_SFO,
@@ -78,21 +78,21 @@ mb<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw">micr
<span class="kw">print</span>(mb<span class="fl">.1</span>)</code></pre></div>
<pre><code>## 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</code></pre>
+## 6364.0611 3 c
+## 972.2856 3 b
+## 759.7171 3 a</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">autoplot</span>(mb<span class="fl">.1</span>)</code></pre></div>
<p><img src="compiled_models_files/figure-html/benchmark_SFO_SFO-1.png" width="672"></p>
-<p>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:</p>
+<p>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:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">rownames</span>(smb<span class="fl">.1</span>) &lt;-<span class="st"> </span>smb<span class="fl">.1</span>$expr
smb<span class="fl">.1</span>[<span class="st">"median"</span>]/smb<span class="fl">.1</span>[<span class="st">"deSolve, compiled"</span>, <span class="st">"median"</span>]</code></pre></div>
<pre><code>## median
-## deSolve, not compiled 8.521041
-## Eigenvalue based 1.216179
+## deSolve, not compiled 8.360665
+## Eigenvalue based 1.252071
## deSolve, compiled 1.000000</code></pre>
</div>
<div id="model-that-can-not-be-solved-with-eigenvalues" class="section level2">
@@ -103,7 +103,7 @@ smb<span class="fl">.1</span>[<span class="st">"median"</span>]/smb<span class="
<span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mb<span class="fl">.2</span> &lt;-<span class="st"> </span><span class="kw">microbenchmark</span>(
- <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_2006_D,
+ <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_2006_D,
<span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
<span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_2006_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
<span class="dt">times =</span> <span class="dv">3</span>, <span class="dt">control =</span> <span class="kw">list</span>(<span class="dt">warmup =</span> <span class="dv">0</span>))</code></pre></div>
@@ -114,18 +114,18 @@ smb<span class="fl">.1</span>[<span class="st">"median"</span>]/smb<span class="
<span class="kw">print</span>(mb<span class="fl">.2</span>)</code></pre></div>
<pre><code>## 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</code></pre>
+## 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</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">smb<span class="fl">.2</span>[<span class="st">"median"</span>]/smb<span class="fl">.2</span>[<span class="st">"deSolve, compiled"</span>, <span class="st">"median"</span>]</code></pre></div>
<pre><code>## median
## 1 NA
## 2 NA</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">autoplot</span>(mb<span class="fl">.2</span>)</code></pre></div>
<p><img src="compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png" width="672"></p>
-<p>Here we get a performance benefit of a factor of 9.3 using the version of the differential equation model compiled from C code!</p>
+<p>Here we get a performance benefit of a factor of 10.1 using the version of the differential equation model compiled from C code!</p>
<p>This vignette was built with mkin 0.9.44.9000 on</p>
<pre><code>## 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
--- 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
Binary files 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
--- 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
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_1-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_10-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_11-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_11a-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_11b-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_2-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_3-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_5-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_6-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_7-1.pdf
Binary files 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
--- a/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf
+++ b/docs/articles/figure/FOCUS_2006_Z_fits_9-1.pdf
Binary files 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 @@
<h1>mkin - Kinetic evaluation of chemical degradation data</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2016-11-04</h4>
+ <h4 class="date">2016-11-17</h4>
</div>
@@ -51,25 +51,33 @@
<div id="abstract" class="section level1">
<h1 class="hasAnchor"><html><body><a href="#abstract" class="anchor"> </a></body></html>Abstract</h1>
<p>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 <code>R</code> add-on package <code>mkin</code> <span class="citation">(Ranke 2016)</span> 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.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">require</span>(mkin)
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(mkin)
+<span class="co"># Define the kinetic model</span>
m_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">parent =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>),
<span class="dt">M1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>),
- <span class="dt">M2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="dt">M2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
<span class="dt">use_of_ff =</span> <span class="st">"max"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-sampling_times =<span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>, <span class="dv">60</span>, <span class="dv">90</span>, <span class="dv">120</span>)
+<span class="co"># Produce model predictions using some arbitrary parameters</span>
+sampling_times =<span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>, <span class="dv">60</span>, <span class="dv">90</span>, <span class="dv">120</span>)
d_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinpredict.html">mkinpredict</a></span>(m_SFO_SFO_SFO,
- <span class="kw">c</span>(<span class="dt">k_parent =</span> <span class="fl">0.03</span>,
- <span class="dt">f_parent_to_M1 =</span> <span class="fl">0.5</span>, <span class="dt">k_M1 =</span> <span class="kw">log</span>(<span class="dv">2</span>)/<span class="dv">100</span>,
+ <span class="kw">c</span>(<span class="dt">k_parent =</span> <span class="fl">0.03</span>,
+ <span class="dt">f_parent_to_M1 =</span> <span class="fl">0.5</span>, <span class="dt">k_M1 =</span> <span class="kw">log</span>(<span class="dv">2</span>)/<span class="dv">100</span>,
<span class="dt">f_M1_to_M2 =</span> <span class="fl">0.9</span>, <span class="dt">k_M2 =</span> <span class="kw">log</span>(<span class="dv">2</span>)/<span class="dv">50</span>),
<span class="kw">c</span>(<span class="dt">parent =</span> <span class="dv">100</span>, <span class="dt">M1 =</span> <span class="dv">0</span>, <span class="dt">M2 =</span> <span class="dv">0</span>),
sampling_times)
-d_SFO_SFO_SFO_err &lt;-<span class="st"> </span><span class="kw"><a href="../reference/add_err.html">add_err</a></span>(d_SFO_SFO_SFO, function(x) <span class="dv">3</span>, <span class="dt">n =</span> <span class="dv">1</span>, <span class="dt">seed =</span> <span class="dv">123456789</span> )
+<span class="co"># Generate a dataset by adding normally distributed errors with</span>
+<span class="co"># standard deviation 3, for two replicates at each sampling time</span>
+d_SFO_SFO_SFO_err &lt;-<span class="st"> </span><span class="kw"><a href="../reference/add_err.html">add_err</a></span>(d_SFO_SFO_SFO, <span class="dt">reps =</span> <span class="dv">2</span>,
+ <span class="dt">sdfunc =</span> function(x) <span class="dv">3</span>,
+ <span class="dt">n =</span> <span class="dv">1</span>, <span class="dt">seed =</span> <span class="dv">123456789</span> )
+<span class="co"># Fit the model to the dataset</span>
f_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[<span class="dv">1</span>]], <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
+<span class="co"># Plot the results separately for parent and metabolites</span>
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(f_SFO_SFO_SFO, <span class="dt">lpos =</span> <span class="kw">c</span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span>))</code></pre></div>
<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
</div>
@@ -129,13 +137,13 @@ f_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../referen
<p>&mdash;&mdash;&mdash;. 2014. <em>Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration</em>. 1.1 ed. <a href="http://focus.jrc.ec.europa.eu/dk" class="uri">http://focus.jrc.ec.europa.eu/dk</a>.</p>
</div>
<div id="ref-rcore2016">
-<p>R Development Core Team. 2016. <em>R: A Language and Environment for Statistical Computing</em>. Vienna, Austria: R Foundation for Statistical Computing. <a href="http://www.R-project.org" class="uri">http://www.R-project.org</a>.</p>
+<p>R Development Core Team. 2016. <em>R: A Language and Environment for Statistical Computing</em>. Vienna, Austria: R Foundation for Statistical Computing. <a href="https://www.R-project.org" class="uri">https://www.R-project.org</a>.</p>
</div>
<div id="ref-pkg:kinfit">
-<p>Ranke, J. 2015. <em>&lsquo;Kinfit&lsquo;: Routines for Fitting Simple Kinetic Models to Chemical Degradation Data</em>. <a href="http://CRAN.R-project.org/package=kinfit" class="uri">http://CRAN.R-project.org/package=kinfit</a>.</p>
+<p>Ranke, J. 2015. <em>&lsquo;Kinfit&lsquo;: Routines for Fitting Simple Kinetic Models to Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=kinfit" class="uri">https://CRAN.R-project.org/package=kinfit</a>.</p>
</div>
<div id="ref-pkg:mkin">
-<p>&mdash;&mdash;&mdash;. 2016. <em>&lsquo;Mkin&lsquo;: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="http://CRAN.R-project.org/package=mkin" class="uri">http://CRAN.R-project.org/package=mkin</a>.</p>
+<p>&mdash;&mdash;&mdash;. 2016. <em>&lsquo;Mkin&lsquo;: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin" class="uri">https://CRAN.R-project.org/package=mkin</a>.</p>
</div>
<div id="ref-ranke2012">
<p>Ranke, J., and R. Lehmann. 2012. &ldquo;Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.&rdquo; In <em>SETAC World 20-24 May</em>. Berlin.</p>
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
--- /dev/null
+++ b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.RData
Binary files 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
--- /dev/null
+++ b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdb
Binary files 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
--- /dev/null
+++ b/docs/articles/mkin_cache/html/unnamed-chunk-2_160d963eca06fe4baa61a0a422a1ea70.rdx
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.RData
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdb
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_60bc93a2c97228ef4815e972498edefa.rdx
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.RData
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdb
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_cache/html/unnamed-chunk-2_f17bce9fa804585d9877abdce3dac24a.rdx
+++ /dev/null
Binary files 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
--- a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png
+++ b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png
Binary files 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,

Contact - Imprint