aboutsummaryrefslogtreecommitdiff
path: root/docs/articles
diff options
context:
space:
mode:
Diffstat (limited to 'docs/articles')
-rw-r--r--docs/articles/FOCUS_D.html18
-rw-r--r--docs/articles/FOCUS_L.html162
-rw-r--r--docs/articles/FOCUS_Z.html168
-rw-r--r--docs/articles/compiled_models.html90
-rw-r--r--docs/articles/mkin.html58
-rw-r--r--docs/articles/twa.html2
6 files changed, 249 insertions, 249 deletions
diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html
index 630b1d02..0afabe7f 100644
--- a/docs/articles/FOCUS_D.html
+++ b/docs/articles/FOCUS_D.html
@@ -84,7 +84,7 @@
<h1>Example evaluation of FOCUS Example Dataset D</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>FOCUS_D.Rmd</code></div>
@@ -94,8 +94,8 @@
<p>This is just a very simple vignette showing how to fit a degradation model for a parent compound with one transformation product using <code>mkin</code>. After loading the library we look a the data. We have observed concentrations in the column named <code>value</code> at the times specified in column <code>time</code> for the two observed variables named <code>parent</code> and <code>m1</code>.</p>
-<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>)
-<span class="kw">print</span>(FOCUS_<span class="dv">2006</span>_D)</code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="kw">print</span>(FOCUS_<span class="dv">2006</span>_D)</a></code></pre></div>
<pre><code>## name time value
## 1 parent 0 99.46
## 2 parent 0 102.04
@@ -143,23 +143,23 @@
## 44 m1 120 33.31</code></pre>
<p>Next we specify the degradation model: The parent compound degrades with simple first-order kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics.</p>
<p>The call to mkinmod returns a degradation model. The differential equations represented in R code can be found in the character vector <code>$diffs</code> of the <code>mkinmod</code> object. If a C compiler (gcc) is installed and functional, the differential equation model will be compiled from auto-generated C code.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">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>))</code></pre></div>
+<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1">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>))</a></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"><span class="kw">print</span>(SFO_SFO<span class="op">$</span>diffs)</code></pre></div>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw">print</span>(SFO_SFO<span class="op">$</span>diffs)</a></code></pre></div>
<pre><code>## parent
## "d_parent = - k_parent_sink * parent - k_parent_m1 * parent"
## m1
## "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_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">fit &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<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>
+<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><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>))</a></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>
+<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(fit)</a></code></pre></div>
<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>
+<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw">summary</span>(fit)</a></code></pre></div>
<pre><code>## mkin version used for fitting: 0.9.47.1
## R version used for fitting: 3.5.1
## Date of fit: Wed Jul 18 14:52:30 2018
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 72c293b9..4b324b7e 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -84,7 +84,7 @@
<h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>FOCUS_L.Rmd</code></div>
@@ -97,28 +97,28 @@
<h1 class="hasAnchor">
<a href="#laboratory-data-l1" class="anchor"></a>Laboratory Data L1</h1>
<p>The following code defines example dataset L1 from the FOCUS kinetics report, p. 284:</p>
-<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_<span class="dv">2006</span>_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="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_<span class="dv">2006</span>_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_<span class="dv">2006</span>_L1)</code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2">FOCUS_<span class="dv">2006</span>_L1 =<span class="st"> </span><span class="kw">data.frame</span>(</a>
+<a class="sourceLine" id="cb1-3" data-line-number="3"> <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>),</a>
+<a class="sourceLine" id="cb1-4" data-line-number="4"> <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>,</a>
+<a class="sourceLine" id="cb1-5" data-line-number="5"> <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>,</a>
+<a class="sourceLine" id="cb1-6" data-line-number="6"> <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>))</a>
+<a class="sourceLine" id="cb1-7" data-line-number="7">FOCUS_<span class="dv">2006</span>_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_<span class="dv">2006</span>_L1)</a></code></pre></div>
<p>Here we use the assumptions of simple first order (SFO), the case of declining rate constant over time (FOMC) and the case of two different phases of the kinetics (DFOP). For a more detailed discussion of the models, please see the FOCUS kinetics report.</p>
<p>Since mkin version 0.9-32 (July 2014), we can use shorthand notation like <code>"SFO"</code> for parent only degradation models. The following two lines fit the model and produce the summary report of the model fit. This covers the numerical analysis given in the FOCUS report.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L1.SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw">summary</span>(m.L1.SFO)</code></pre></div>
-<pre><code>## mkin version used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">m.L1.SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="kw">summary</span>(m.L1.SFO)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:17 2018
-## Date of summary: Wed Jul 18 15:16:17 2018
+## Date of fit: Thu Sep 6 11:51:22 2018
+## Date of summary: Thu Sep 6 11:51:22 2018
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 37 model solutions performed in 0.081 s
+## Fitted with method Port using 37 model solutions performed in 0.085 s
##
## Weighting: none
##
@@ -189,27 +189,27 @@ FOCUS_<span class="dv">2006</span>_L1_mkin &lt;-<span class="st"> </span><span c
## 30 parent 2.9 5.251 -2.3513
## 30 parent 4.0 5.251 -1.2513</code></pre>
<p>A plot of the fit is obtained with the plot function for mkinfit objects.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(m.L1.SFO, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - SFO"</span>)</code></pre></div>
+<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw">plot</span>(m.L1.SFO, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - SFO"</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-4-1.png" width="576"></p>
<p>The residual plot can be easily obtained by</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinresplot.html">mkinresplot</a></span>(m.L1.SFO, <span class="dt">ylab =</span> <span class="st">"Observed"</span>, <span class="dt">xlab =</span> <span class="st">"Time"</span>)</code></pre></div>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="../reference/mkinresplot.html">mkinresplot</a></span>(m.L1.SFO, <span class="dt">ylab =</span> <span class="st">"Observed"</span>, <span class="dt">xlab =</span> <span class="st">"Time"</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-5-1.png" width="576"></p>
<p>For comparison, the FOMC model is fitted as well, and the <span class="math inline">\(\chi^2\)</span> error level is checked.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L1.FOMC &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>)
-<span class="kw">plot</span>(m.L1.FOMC, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - FOMC"</span>)</code></pre></div>
+<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">m.L1.FOMC &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="kw">plot</span>(m.L1.FOMC, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - FOMC"</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-6-1.png" width="576"></p>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw">summary</span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:19 2018
-## Date of summary: Wed Jul 18 15:16:19 2018
+## Date of fit: Thu Sep 6 11:51:24 2018
+## Date of summary: Thu Sep 6 11:51:24 2018
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 611 model solutions performed in 1.304 s
+## Fitted with method Port using 611 model solutions performed in 1.348 s
##
## Weighting: none
##
@@ -267,19 +267,19 @@ FOCUS_<span class="dv">2006</span>_L1_mkin &lt;-<span class="st"> </span><span c
<h1 class="hasAnchor">
<a href="#laboratory-data-l2" class="anchor"></a>Laboratory Data L2</h1>
<p>The following code defines example dataset L2 from the FOCUS kinetics report, p. 287:</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L2 =<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">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>), <span class="dt">each =</span> <span class="dv">2</span>),
- <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">96.1</span>, <span class="fl">91.8</span>, <span class="fl">41.4</span>, <span class="fl">38.7</span>,
- <span class="fl">19.3</span>, <span class="fl">22.3</span>, <span class="fl">4.6</span>, <span class="fl">4.6</span>,
- <span class="fl">2.6</span>, <span class="fl">1.2</span>, <span class="fl">0.3</span>, <span class="fl">0.6</span>))
-FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L2)</code></pre></div>
+<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">FOCUS_<span class="dv">2006</span>_L2 =<span class="st"> </span><span class="kw">data.frame</span>(</a>
+<a class="sourceLine" id="cb9-2" data-line-number="2"> <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">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>), <span class="dt">each =</span> <span class="dv">2</span>),</a>
+<a class="sourceLine" id="cb9-3" data-line-number="3"> <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">96.1</span>, <span class="fl">91.8</span>, <span class="fl">41.4</span>, <span class="fl">38.7</span>,</a>
+<a class="sourceLine" id="cb9-4" data-line-number="4"> <span class="fl">19.3</span>, <span class="fl">22.3</span>, <span class="fl">4.6</span>, <span class="fl">4.6</span>,</a>
+<a class="sourceLine" id="cb9-5" data-line-number="5"> <span class="fl">2.6</span>, <span class="fl">1.2</span>, <span class="fl">0.3</span>, <span class="fl">0.6</span>))</a>
+<a class="sourceLine" id="cb9-6" data-line-number="6">FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L2)</a></code></pre></div>
<div id="sfo-fit-for-l2" class="section level2">
<h2 class="hasAnchor">
<a href="#sfo-fit-for-l2" class="anchor"></a>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_<span class="dv">2006</span>_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="dt">main =</span> <span class="st">"FOCUS L2 - SFO"</span>)</code></pre></div>
+<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1">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_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb10-2" data-line-number="2"><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>,</a>
+<a class="sourceLine" id="cb10-3" data-line-number="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - SFO"</span>)</a></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>
<p>In the FOCUS kinetics report, it is stated that there is no apparent systematic error observed from the residual plot up to the measured DT90 (approximately at day 5), and there is an underestimation beyond that point.</p>
@@ -289,22 +289,22 @@ FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span c
<h2 class="hasAnchor">
<a href="#fomc-fit-for-l2" class="anchor"></a>FOMC fit for L2</h2>
<p>For comparison, the FOMC model is fitted as well, and the <span class="math inline">\(\chi^2\)</span> error level is checked.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.FOMC &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw">plot</span>(m.L2.FOMC, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>,
- <span class="dt">main =</span> <span class="st">"FOCUS L2 - FOMC"</span>)</code></pre></div>
+<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">m.L2.FOMC &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="kw">plot</span>(m.L2.FOMC, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>,</a>
+<a class="sourceLine" id="cb11-3" data-line-number="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - FOMC"</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-9-1.png" width="672"></p>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw">summary</span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:19 2018
-## Date of summary: Wed Jul 18 15:16:19 2018
+## Date of fit: Thu Sep 6 11:51:25 2018
+## Date of summary: Thu Sep 6 11:51:25 2018
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 81 model solutions performed in 0.175 s
+## Fitted with method Port using 81 model solutions performed in 0.182 s
##
## Weighting: none
##
@@ -360,15 +360,15 @@ FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span c
<h2 class="hasAnchor">
<a href="#dfop-fit-for-l2" class="anchor"></a>DFOP fit for L2</h2>
<p>Fitting the four parameter DFOP model further reduces the <span class="math inline">\(\chi^2\)</span> error level.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.DFOP &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw">plot</span>(m.L2.DFOP, <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 - DFOP"</span>)</code></pre></div>
+<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1">m.L2.DFOP &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="kw">plot</span>(m.L2.DFOP, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>,</a>
+<a class="sourceLine" id="cb14-3" data-line-number="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - DFOP"</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-10-1.png" width="672"></p>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="kw">summary</span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:20 2018
-## Date of summary: Wed Jul 18 15:16:20 2018
+## Date of fit: Thu Sep 6 11:51:26 2018
+## Date of summary: Thu Sep 6 11:51:26 2018
##
## Equations:
## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -377,7 +377,7 @@ FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span c
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 336 model solutions performed in 0.721 s
+## Fitted with method Port using 336 model solutions performed in 0.749 s
##
## Weighting: none
##
@@ -436,18 +436,18 @@ FOCUS_<span class="dv">2006</span>_L2_mkin &lt;-<span class="st"> </span><span c
<h1 class="hasAnchor">
<a href="#laboratory-data-l3" class="anchor"></a>Laboratory Data L3</h1>
<p>The following code defines example dataset L3 from the FOCUS kinetics report, p. 290.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L3 =<span class="st"> </span><span class="kw">data.frame</span>(
- <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>),
- <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">97.8</span>, <span class="dv">60</span>, <span class="dv">51</span>, <span class="dv">43</span>, <span class="dv">35</span>, <span class="dv">22</span>, <span class="dv">15</span>, <span class="dv">12</span>))
-FOCUS_<span class="dv">2006</span>_L3_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L3)</code></pre></div>
+<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">FOCUS_<span class="dv">2006</span>_L3 =<span class="st"> </span><span class="kw">data.frame</span>(</a>
+<a class="sourceLine" id="cb19-2" data-line-number="2"> <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>),</a>
+<a class="sourceLine" id="cb19-3" data-line-number="3"> <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">97.8</span>, <span class="dv">60</span>, <span class="dv">51</span>, <span class="dv">43</span>, <span class="dv">35</span>, <span class="dv">22</span>, <span class="dv">15</span>, <span class="dv">12</span>))</a>
+<a class="sourceLine" id="cb19-4" data-line-number="4">FOCUS_<span class="dv">2006</span>_L3_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L3)</a></code></pre></div>
<div id="fit-multiple-models" class="section level2">
<h2 class="hasAnchor">
<a href="#fit-multiple-models" class="anchor"></a>Fit multiple models</h2>
<p>As of mkin version 0.9-39 (June 2015), we can fit several models to one or more datasets in one call to the function <code>mmkin</code>. The datasets have to be passed in a list, in this case a named list holding only the L3 dataset prepared above.</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.L3 &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="st">"DFOP"</span>), <span class="dt">cores =</span> <span class="dv">1</span>,
- <span class="kw">list</span>(<span class="st">"FOCUS L3"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L3_mkin), <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw">plot</span>(mm.L3)</code></pre></div>
+<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1"><span class="co"># Only use one core here, not to offend the CRAN checks</span></a>
+<a class="sourceLine" id="cb20-2" data-line-number="2">mm.L3 &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="st">"DFOP"</span>), <span class="dt">cores =</span> <span class="dv">1</span>,</a>
+<a class="sourceLine" id="cb20-3" data-line-number="3"> <span class="kw">list</span>(<span class="st">"FOCUS L3"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L3_mkin), <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb20-4" data-line-number="4"><span class="kw">plot</span>(mm.L3)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-12-1.png" width="700"></p>
<p>The <span class="math inline">\(\chi^2\)</span> error level of 21% as well as the plot suggest that the SFO model does not fit very well. The FOMC model performs better, with an error level at which the <span class="math inline">\(\chi^2\)</span> test passes of 7%. Fitting the four parameter DFOP model further reduces the <span class="math inline">\(\chi^2\)</span> error level considerably.</p>
</div>
@@ -456,11 +456,11 @@ mm.L3 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<a href="#accessing-mmkin-objects" class="anchor"></a>Accessing mmkin objects</h2>
<p>The objects returned by mmkin are arranged like a matrix, with models as a row index and datasets as a column index.</p>
<p>We can extract the summary and plot for <em>e.g.</em> the DFOP fit, using square brackets for indexing which will result in the use of the summary and plot functions working on mkinfit objects.</p>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="kw">summary</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:21 2018
-## Date of summary: Wed Jul 18 15:16:21 2018
+## Date of fit: Thu Sep 6 11:51:27 2018
+## Date of summary: Thu Sep 6 11:51:27 2018
##
## Equations:
## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -469,7 +469,7 @@ mm.L3 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 137 model solutions performed in 0.294 s
+## Fitted with method Port using 137 model solutions performed in 0.329 s
##
## Weighting: none
##
@@ -535,7 +535,7 @@ mm.L3 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
## 60 parent 22.0 23.26 -1.25919
## 91 parent 15.0 15.18 -0.18181
## 120 parent 12.0 10.19 1.81395</code></pre>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]], <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="kw">plot</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]], <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-13-1.png" width="700"></p>
<p>Here, a look to the model plot, the confidence intervals of the parameters and the correlation matrix suggest that the parameter estimates are reliable, and the DFOP model can be used as the best-fit model based on the <span class="math inline">\(\chi^2\)</span> error level criterion for laboratory data L3.</p>
<p>This is also an example where the standard t-test for the parameter <code>g_ilr</code> is misleading, as it tests for a significant difference from zero. In this case, zero appears to be the correct value for this parameter, and the confidence interval for the backtransformed parameter <code>g</code> is quite narrow.</p>
@@ -545,30 +545,30 @@ mm.L3 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
<h1 class="hasAnchor">
<a href="#laboratory-data-l4" class="anchor"></a>Laboratory Data L4</h1>
<p>The following code defines example dataset L4 from the FOCUS kinetics report, p. 293:</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L4 =<span class="st"> </span><span class="kw">data.frame</span>(
- <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>),
- <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">96.6</span>, <span class="fl">96.3</span>, <span class="fl">94.3</span>, <span class="fl">88.8</span>, <span class="fl">74.9</span>, <span class="fl">59.9</span>, <span class="fl">53.5</span>, <span class="fl">49.0</span>))
-FOCUS_<span class="dv">2006</span>_L4_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L4)</code></pre></div>
+<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">FOCUS_<span class="dv">2006</span>_L4 =<span class="st"> </span><span class="kw">data.frame</span>(</a>
+<a class="sourceLine" id="cb24-2" data-line-number="2"> <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>),</a>
+<a class="sourceLine" id="cb24-3" data-line-number="3"> <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">96.6</span>, <span class="fl">96.3</span>, <span class="fl">94.3</span>, <span class="fl">88.8</span>, <span class="fl">74.9</span>, <span class="fl">59.9</span>, <span class="fl">53.5</span>, <span class="fl">49.0</span>))</a>
+<a class="sourceLine" id="cb24-4" data-line-number="4">FOCUS_<span class="dv">2006</span>_L4_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L4)</a></code></pre></div>
<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_<span class="dv">2006</span>_L4_mkin),
- <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw">plot</span>(mm.L4)</code></pre></div>
+<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="co"># Only use one core here, not to offend the CRAN checks</span></a>
+<a class="sourceLine" id="cb25-2" data-line-number="2">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>,</a>
+<a class="sourceLine" id="cb25-3" data-line-number="3"> <span class="kw">list</span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L4_mkin),</a>
+<a class="sourceLine" id="cb25-4" data-line-number="4"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb25-5" data-line-number="5"><span class="kw">plot</span>(mm.L4)</a></code></pre></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-15-1.png" width="700"></p>
<p>The <span class="math inline">\(\chi^2\)</span> error level of 3.3% as well as the plot suggest that the SFO model fits very well. The error level at which the <span class="math inline">\(\chi^2\)</span> test passes is slightly lower for the FOMC model. However, the difference appears negligible.</p>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1"><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>)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:22 2018
-## Date of summary: Wed Jul 18 15:16:22 2018
+## Date of fit: Thu Sep 6 11:51:27 2018
+## Date of summary: Thu Sep 6 11:51:27 2018
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 46 model solutions performed in 0.092 s
+## Fitted with method Port using 46 model solutions performed in 0.107 s
##
## Weighting: none
##
@@ -617,18 +617,18 @@ mm.L4 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin
## Estimated disappearance times:
## DT50 DT90
## parent 106 352</code></pre>
-<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 used for fitting: 0.9.47.1
+<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" data-line-number="1"><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>)</a></code></pre></div>
+<pre><code>## mkin version used for fitting: 0.9.47.2
## R version used for fitting: 3.5.1
-## Date of fit: Wed Jul 18 15:16:22 2018
-## Date of summary: Wed Jul 18 15:16:22 2018
+## Date of fit: Thu Sep 6 11:51:27 2018
+## Date of summary: Thu Sep 6 11:51:27 2018
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted with method Port using 66 model solutions performed in 0.137 s
+## Fitted with method Port using 66 model solutions performed in 0.161 s
##
## Weighting: none
##
diff --git a/docs/articles/FOCUS_Z.html b/docs/articles/FOCUS_Z.html
index d8b9c961..6e7707f8 100644
--- a/docs/articles/FOCUS_Z.html
+++ b/docs/articles/FOCUS_Z.html
@@ -84,7 +84,7 @@
<h1>Example evaluation of FOCUS dataset Z</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>FOCUS_Z.Rmd</code></div>
@@ -98,33 +98,33 @@
<h1 class="hasAnchor">
<a href="#the-data" class="anchor"></a>The data</h1>
<p>The following code defines the example dataset from Appendix 7 to the FOCUS kinetics report <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014, 354)</span>.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(mkin, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)
-LOD =<span class="st"> </span><span class="fl">0.5</span>
-FOCUS_<span class="dv">2006</span>_Z =<span class="st"> </span><span class="kw">data.frame</span>(
- <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">0.04</span>, <span class="fl">0.125</span>, <span class="fl">0.29</span>, <span class="fl">0.54</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">10</span>, <span class="dv">14</span>, <span class="dv">21</span>,
- <span class="dv">42</span>, <span class="dv">61</span>, <span class="dv">96</span>, <span class="dv">124</span>),
- <span class="dt">Z0 =</span> <span class="kw">c</span>(<span class="dv">100</span>, <span class="fl">81.7</span>, <span class="fl">70.4</span>, <span class="fl">51.1</span>, <span class="fl">41.2</span>, <span class="fl">6.6</span>, <span class="fl">4.6</span>, <span class="fl">3.9</span>, <span class="fl">4.6</span>, <span class="fl">4.3</span>, <span class="fl">6.8</span>,
- <span class="fl">2.9</span>, <span class="fl">3.5</span>, <span class="fl">5.3</span>, <span class="fl">4.4</span>, <span class="fl">1.2</span>, <span class="fl">0.7</span>),
- <span class="dt">Z1 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">18.3</span>, <span class="fl">29.6</span>, <span class="fl">46.3</span>, <span class="fl">55.1</span>, <span class="fl">65.7</span>, <span class="fl">39.1</span>, <span class="dv">36</span>, <span class="fl">15.3</span>, <span class="fl">5.6</span>, <span class="fl">1.1</span>,
- <span class="fl">1.6</span>, <span class="fl">0.6</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),
- <span class="dt">Z2 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="fl">2.6</span>, <span class="fl">3.8</span>, <span class="fl">15.3</span>, <span class="fl">37.2</span>, <span class="fl">31.7</span>, <span class="fl">35.6</span>, <span class="fl">14.5</span>,
- <span class="fl">0.8</span>, <span class="fl">2.1</span>, <span class="fl">1.9</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),
- <span class="dt">Z3 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="fl">9.2</span>, <span class="fl">13.1</span>, <span class="fl">22.3</span>, <span class="fl">28.4</span>, <span class="fl">32.5</span>,
- <span class="fl">25.2</span>, <span class="fl">17.2</span>, <span class="fl">4.8</span>, <span class="fl">4.5</span>, <span class="fl">2.8</span>, <span class="fl">4.4</span>))
-
-FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_Z)</code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(mkin, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2">LOD =<span class="st"> </span><span class="fl">0.5</span></a>
+<a class="sourceLine" id="cb1-3" data-line-number="3">FOCUS_<span class="dv">2006</span>_Z =<span class="st"> </span><span class="kw">data.frame</span>(</a>
+<a class="sourceLine" id="cb1-4" data-line-number="4"> <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">0.04</span>, <span class="fl">0.125</span>, <span class="fl">0.29</span>, <span class="fl">0.54</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">10</span>, <span class="dv">14</span>, <span class="dv">21</span>,</a>
+<a class="sourceLine" id="cb1-5" data-line-number="5"> <span class="dv">42</span>, <span class="dv">61</span>, <span class="dv">96</span>, <span class="dv">124</span>),</a>
+<a class="sourceLine" id="cb1-6" data-line-number="6"> <span class="dt">Z0 =</span> <span class="kw">c</span>(<span class="dv">100</span>, <span class="fl">81.7</span>, <span class="fl">70.4</span>, <span class="fl">51.1</span>, <span class="fl">41.2</span>, <span class="fl">6.6</span>, <span class="fl">4.6</span>, <span class="fl">3.9</span>, <span class="fl">4.6</span>, <span class="fl">4.3</span>, <span class="fl">6.8</span>,</a>
+<a class="sourceLine" id="cb1-7" data-line-number="7"> <span class="fl">2.9</span>, <span class="fl">3.5</span>, <span class="fl">5.3</span>, <span class="fl">4.4</span>, <span class="fl">1.2</span>, <span class="fl">0.7</span>),</a>
+<a class="sourceLine" id="cb1-8" data-line-number="8"> <span class="dt">Z1 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">18.3</span>, <span class="fl">29.6</span>, <span class="fl">46.3</span>, <span class="fl">55.1</span>, <span class="fl">65.7</span>, <span class="fl">39.1</span>, <span class="dv">36</span>, <span class="fl">15.3</span>, <span class="fl">5.6</span>, <span class="fl">1.1</span>,</a>
+<a class="sourceLine" id="cb1-9" data-line-number="9"> <span class="fl">1.6</span>, <span class="fl">0.6</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),</a>
+<a class="sourceLine" id="cb1-10" data-line-number="10"> <span class="dt">Z2 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="fl">2.6</span>, <span class="fl">3.8</span>, <span class="fl">15.3</span>, <span class="fl">37.2</span>, <span class="fl">31.7</span>, <span class="fl">35.6</span>, <span class="fl">14.5</span>,</a>
+<a class="sourceLine" id="cb1-11" data-line-number="11"> <span class="fl">0.8</span>, <span class="fl">2.1</span>, <span class="fl">1.9</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),</a>
+<a class="sourceLine" id="cb1-12" data-line-number="12"> <span class="dt">Z3 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="fl">9.2</span>, <span class="fl">13.1</span>, <span class="fl">22.3</span>, <span class="fl">28.4</span>, <span class="fl">32.5</span>,</a>
+<a class="sourceLine" id="cb1-13" data-line-number="13"> <span class="fl">25.2</span>, <span class="fl">17.2</span>, <span class="fl">4.8</span>, <span class="fl">4.5</span>, <span class="fl">2.8</span>, <span class="fl">4.4</span>))</a>
+<a class="sourceLine" id="cb1-14" data-line-number="14"></a>
+<a class="sourceLine" id="cb1-15" data-line-number="15">FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_Z)</a></code></pre></div>
</div>
<div id="parent-and-one-metabolite" class="section level1">
<h1 class="hasAnchor">
<a href="#parent-and-one-metabolite" class="anchor"></a>Parent and one metabolite</h1>
<p>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, with formation and decline of metabolite Z1 and the pathway from parent directly to sink included (default in mkin).</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.2</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">Z<span class="fl">.2</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),</a>
+<a class="sourceLine" id="cb2-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</a></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">m.Z<span class="fl">.2</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a)</code></pre></div>
+<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">m.Z<span class="fl">.2</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png" width="700"></p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</a></code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 9.7015e+01 3.553140 2.7304e+01 1.6793e-21 NA NA
## k_Z0_sink 1.2790e-11 0.226895 5.6368e-11 5.0000e-01 NA NA
@@ -132,14 +132,14 @@ FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span cl
## k_Z1_sink 4.8212e-01 0.065854 7.3212e+00 3.5520e-08 NA NA</code></pre>
<p>As obvious from the parameter summary (the component of the summary), the kinetic rate constant from parent compound Z to sink is very small and the t-test for this parameter suggests that it is not significantly different from zero. This suggests, in agreement with the analysis in the FOCUS kinetics report, to simplify the model by removing the pathway to sink.</p>
<p>A similar result can be obtained when formation fractions are used in the model formulation:</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.2</span>a.ff &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
- <span class="dt">Z1 =</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>)</code></pre></div>
+<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">Z<span class="fl">.2</span>a.ff &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),</a>
+<a class="sourceLine" id="cb7-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),</a>
+<a class="sourceLine" id="cb7-3" data-line-number="3"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</a></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">m.Z<span class="fl">.2</span>a.ff &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a.ff, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a.ff)</code></pre></div>
+<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">m.Z<span class="fl">.2</span>a.ff &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a.ff, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a.ff)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png" width="700"></p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a.ff, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div>
+<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a.ff, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</a></code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 97.01488 3.553145 27.3039 1.6793e-21 NA NA
## k_Z0 2.23601 0.216849 10.3114 3.6623e-11 NA NA
@@ -148,13 +148,13 @@ FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span cl
<p>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. Here, the covariance matrix used for the calculation of confidence intervals is not returned as the model is overparameterised.</p>
<p>A simplified model is obtained by removing the pathway to the sink. </p>
<p>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 metabolite.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</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>)</code></pre></div>
+<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">Z<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb12-2" data-line-number="2"> <span class="dt">Z1 =</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>)</a></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">m.Z<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.3</span>)</code></pre></div>
+<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1">m.Z<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.3</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png" width="700"></p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.3</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div>
+<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="kw">summary</span>(m.Z<span class="fl">.3</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</a></code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 97.01488 2.681772 36.176 2.3636e-25 91.52152 102.508
## k_Z0 2.23601 0.146861 15.225 2.2464e-15 1.95453 2.558
@@ -165,28 +165,28 @@ FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span cl
<h1 class="hasAnchor">
<a href="#metabolites-z2-and-z3" class="anchor"></a>Metabolites Z2 and Z3</h1>
<p>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 assumed that there is additional empirical evidence that Z1 quickly and exclusively hydrolyses to Z2.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</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>)</code></pre></div>
+<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">Z<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb17-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb17-3" data-line-number="3"> <span class="dt">Z2 =</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>)</a></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">m.Z<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.5</span>)</code></pre></div>
+<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1">m.Z<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb19-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.5</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png" width="700"></p>
<p>Finally, metabolite Z3 is added to the model. We use the optimised differential equation parameter values from the previous fit in order to accelerate the optimization.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.FOCUS &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
- <span class="dt">Z3 =</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>)</code></pre></div>
+<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1">Z.FOCUS &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb20-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb20-3" data-line-number="3"> <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),</a>
+<a class="sourceLine" id="cb20-4" data-line-number="4"> <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),</a>
+<a class="sourceLine" id="cb20-5" data-line-number="5"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</a></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">m.Z.FOCUS &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.FOCUS, FOCUS_<span class="dv">2006</span>_Z_mkin,
- <span class="dt">parms.ini =</span> m.Z<span class="fl">.5</span><span class="op">$</span>bparms.ode,
- <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1">m.Z.FOCUS &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.FOCUS, FOCUS_<span class="dv">2006</span>_Z_mkin,</a>
+<a class="sourceLine" id="cb22-2" data-line-number="2"> <span class="dt">parms.ini =</span> m.Z<span class="fl">.5</span><span class="op">$</span>bparms.ode,</a>
+<a class="sourceLine" id="cb22-3" data-line-number="3"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation by method Port did not converge:
## false convergence (8)</code></pre>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.FOCUS)</code></pre></div>
+<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.FOCUS)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="700"></p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div>
+<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="kw">summary</span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</a></code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 96.837112 2.058861 47.0343 5.5877e-44 92.703779 100.970445
## k_Z0 2.215368 0.118098 18.7587 7.6563e-25 1.990525 2.465609
@@ -194,7 +194,7 @@ FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span cl
## k_Z2 0.451617 0.044214 10.2144 3.1133e-14 0.371034 0.549702
## k_Z3 0.058693 0.014296 4.1056 7.2924e-05 0.035994 0.095705
## f_Z2_to_Z3 0.471516 0.057057 8.2639 2.8156e-11 0.360381 0.585548</code></pre>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.FOCUS)</code></pre></div>
+<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb27-1" data-line-number="1"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.FOCUS)</a></code></pre></div>
<pre><code>## $ff
## Z2_Z3 Z2_sink
## 0.47152 0.52848
@@ -215,61 +215,61 @@ FOCUS_<span class="dv">2006</span>_Z_mkin &lt;-<span class="st"> </span><span cl
<a href="#using-the-sforb-model" class="anchor"></a>Using the SFORB model</h1>
<p>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.</p>
<p>Therefore, an additional model is offered here, using the single first-order reversible binding (SFORB) model for metabolite Z3. As expected, the <span class="math inline">\(\chi^2\)</span> 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.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
- <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div>
+<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" data-line-number="1">Z.mkin<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb29-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb29-3" data-line-number="3"> <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),</a>
+<a class="sourceLine" id="cb29-4" data-line-number="4"> <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</a></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">m.Z.mkin<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.1</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.1</span>)</code></pre></div>
+<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" data-line-number="1">m.Z.mkin<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.1</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb31-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.1</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png" width="700"></p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.mkin<span class="fl">.1</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>cov.unscaled</code></pre></div>
+<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" data-line-number="1"><span class="kw">summary</span>(m.Z.mkin<span class="fl">.1</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>cov.unscaled</a></code></pre></div>
<pre><code>## NULL</code></pre>
<p>Therefore, a further stepwise model building is performed starting from the stage of parent and two metabolites, starting from the assumption that the model fit for the parent compound can be improved by using the SFORB model.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
+<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb34-1" data-line-number="1">Z.mkin<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb34-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb34-3" data-line-number="3"> <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</a></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">m.Z.mkin<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.3</span>)</code></pre></div>
+<div class="sourceCode" id="cb36"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb36-1" data-line-number="1">m.Z.mkin<span class="fl">.3</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb36-2" data-line-number="2"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.3</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png" width="700"></p>
<p>This results in a much better representation of the behaviour of the parent compound Z0.</p>
<p>Finally, Z3 is added as well. These models appear overparameterised (no covariance matrix returned) if the sink for Z1 is left in the models.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.4</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
- <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
+<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb37-1" data-line-number="1">Z.mkin<span class="fl">.4</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb37-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb37-3" data-line-number="3"> <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),</a>
+<a class="sourceLine" id="cb37-4" data-line-number="4"> <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</a></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">m.Z.mkin<span class="fl">.4</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.4</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,
- <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.3</span><span class="op">$</span>bparms.ode,
- <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.4</span>)</code></pre></div>
+<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb39-1" data-line-number="1">m.Z.mkin<span class="fl">.4</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.4</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,</a>
+<a class="sourceLine" id="cb39-2" data-line-number="2"> <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.3</span><span class="op">$</span>bparms.ode,</a>
+<a class="sourceLine" id="cb39-3" data-line-number="3"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb39-4" data-line-number="4"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.4</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png" width="700"></p>
<p>The error level of the fit, but especially of metabolite Z3, can be improved if the SFORB model is chosen for this metabolite, as this model is capable of representing the tailing of the metabolite decline phase.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
- <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
- <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div>
+<div class="sourceCode" id="cb40"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb40-1" data-line-number="1">Z.mkin<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb40-2" data-line-number="2"> <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),</a>
+<a class="sourceLine" id="cb40-3" data-line-number="3"> <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),</a>
+<a class="sourceLine" id="cb40-4" data-line-number="4"> <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</a></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">m.Z.mkin<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,
- <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.4</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>],
- <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>)</code></pre></div>
+<div class="sourceCode" id="cb42"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb42-1" data-line-number="1">m.Z.mkin<span class="fl">.5</span> &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,</a>
+<a class="sourceLine" id="cb42-2" data-line-number="2"> <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.4</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>],</a>
+<a class="sourceLine" id="cb42-3" data-line-number="3"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb42-4" data-line-number="4"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png" width="700"></p>
<p>The summary view of the backtransformed parameters shows that we get no confidence intervals due to overparameterisation. As the optimized is excessively small, it seems reasonable to fix it to zero.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.5</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,
- <span class="dt">parms.ini =</span> <span class="kw">c</span>(m.Z.mkin<span class="fl">.5</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">7</span>],
- <span class="dt">k_Z3_bound_free =</span> <span class="dv">0</span>),
- <span class="dt">fixed_parms =</span> <span class="st">"k_Z3_bound_free"</span>,
- <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div>
+<div class="sourceCode" id="cb43"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb43-1" data-line-number="1">m.Z.mkin<span class="fl">.5</span>a &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin,</a>
+<a class="sourceLine" id="cb43-2" data-line-number="2"> <span class="dt">parms.ini =</span> <span class="kw">c</span>(m.Z.mkin<span class="fl">.5</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">7</span>],</a>
+<a class="sourceLine" id="cb43-3" data-line-number="3"> <span class="dt">k_Z3_bound_free =</span> <span class="dv">0</span>),</a>
+<a class="sourceLine" id="cb43-4" data-line-number="4"> <span class="dt">fixed_parms =</span> <span class="st">"k_Z3_bound_free"</span>,</a>
+<a class="sourceLine" id="cb43-5" data-line-number="5"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb43-6" data-line-number="6"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>a)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png" width="700"></p>
<p>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 is proposed as the best-fit model for the dataset from Appendix 7 of the FOCUS report.</p>
<p>A graphical representation of the confidence intervals can finally be obtained.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div>
+<div class="sourceCode" id="cb44"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb44-1" data-line-number="1"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(m.Z.mkin<span class="fl">.5</span>a)</a></code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png" width="700"></p>
<p>The endpoints obtained with this model are</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div>
+<div class="sourceCode" id="cb45"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb45-1" data-line-number="1"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.mkin<span class="fl">.5</span>a)</a></code></pre></div>
<pre><code>## $ff
## Z0_free_Z1 Z1_Z2 Z2_sink Z2_Z3_free Z3_free_sink
## 1.00000 1.00000 0.46344 0.53656 1.00000
diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html
index 183c9658..17387187 100644
--- a/docs/articles/compiled_models.html
+++ b/docs/articles/compiled_models.html
@@ -84,7 +84,7 @@
<h1>Performance benefit by using compiled model definitions in mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>compiled_models.Rmd</code></div>
@@ -97,37 +97,37 @@
<h2 class="hasAnchor">
<a href="#model-that-can-also-be-solved-with-eigenvalues" class="anchor"></a>Model that can also be solved with Eigenvalues</h2>
<p>This evaluation is taken from the example section of mkinfit. When using an mkin version equal to or greater than 0.9-36 and a C compiler (gcc) is available, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. The <code><a href="../reference/mkinmod.html">mkinmod()</a></code> function checks for presence of the gcc compiler using</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">Sys.which</span>(<span class="st">"gcc"</span>)</code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">Sys.which</span>(<span class="st">"gcc"</span>)</a></code></pre></div>
<pre><code>## gcc
## "/usr/bin/gcc"</code></pre>
<p>First, we build a simple degradation model for a parent compound with one metabolite.</p>
-<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>)
-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>))</code></pre></div>
+<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb3-2" data-line-number="2">SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(</a>
+<a class="sourceLine" id="cb3-3" data-line-number="3"> <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>),</a>
+<a class="sourceLine" id="cb3-4" data-line-number="4"> <span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</a></code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<p>We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the benchmark package.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) {
- b<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/rbenchmark/topics/benchmark">benchmark</a></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_<span class="dv">2006</span>_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_<span class="dv">2006</span>_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_<span class="dv">2006</span>_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">replications =</span> <span class="dv">3</span>)
- <span class="kw">print</span>(b<span class="fl">.1</span>)
- factor_SFO_SFO &lt;-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.1</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])
-} <span class="cf">else</span> {
- factor_SFO_SFO &lt;-<span class="st"> </span><span class="ot">NA</span>
- <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>)
-}</code></pre></div>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) {</a>
+<a class="sourceLine" id="cb5-2" data-line-number="2"> b<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/rbenchmark/topics/benchmark">benchmark</a></span>(</a>
+<a class="sourceLine" id="cb5-3" data-line-number="3"> <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_<span class="dv">2006</span>_D,</a>
+<a class="sourceLine" id="cb5-4" data-line-number="4"> <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>,</a>
+<a class="sourceLine" id="cb5-5" data-line-number="5"> <span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),</a>
+<a class="sourceLine" id="cb5-6" data-line-number="6"> <span class="st">"Eigenvalue based"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D,</a>
+<a class="sourceLine" id="cb5-7" data-line-number="7"> <span class="dt">solution_type =</span> <span class="st">"eigen"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),</a>
+<a class="sourceLine" id="cb5-8" data-line-number="8"> <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D,</a>
+<a class="sourceLine" id="cb5-9" data-line-number="9"> <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),</a>
+<a class="sourceLine" id="cb5-10" data-line-number="10"> <span class="dt">replications =</span> <span class="dv">3</span>)</a>
+<a class="sourceLine" id="cb5-11" data-line-number="11"> <span class="kw">print</span>(b<span class="fl">.1</span>)</a>
+<a class="sourceLine" id="cb5-12" data-line-number="12"> factor_SFO_SFO &lt;-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.1</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])</a>
+<a class="sourceLine" id="cb5-13" data-line-number="13">} <span class="cf">else</span> {</a>
+<a class="sourceLine" id="cb5-14" data-line-number="14"> factor_SFO_SFO &lt;-<span class="st"> </span><span class="ot">NA</span></a>
+<a class="sourceLine" id="cb5-15" data-line-number="15"> <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>)</a>
+<a class="sourceLine" id="cb5-16" data-line-number="16">}</a></code></pre></div>
<pre><code>## Lade nötiges Paket: rbenchmark</code></pre>
<pre><code>## test replications elapsed relative user.self sys.self
-## 3 deSolve, compiled 3 2.044 1.000 2.043 0
-## 1 deSolve, not compiled 3 16.571 8.107 16.565 0
-## 2 Eigenvalue based 3 2.499 1.223 2.496 0
+## 3 deSolve, compiled 3 2.112 1.000 2.110 0
+## 1 deSolve, not compiled 3 16.633 7.875 16.624 0
+## 2 Eigenvalue based 3 2.637 1.249 2.635 0
## user.child sys.child
## 3 0 0
## 1 0 0
@@ -138,31 +138,31 @@ SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mki
<h2 class="hasAnchor">
<a href="#model-that-can-not-be-solved-with-eigenvalues" class="anchor"></a>Model that can not be solved with Eigenvalues</h2>
<p>This evaluation is also taken from the example section of mkinfit.</p>
-<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) {
- FOMC_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">"FOMC"</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>))
-
- b<span class="fl">.2</span> &lt;-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/rbenchmark/topics/benchmark">benchmark</a></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_<span class="dv">2006</span>_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_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),
- <span class="dt">replications =</span> <span class="dv">3</span>)
- <span class="kw">print</span>(b<span class="fl">.2</span>)
- factor_FOMC_SFO &lt;-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])
-} <span class="cf">else</span> {
- factor_FOMC_SFO &lt;-<span class="st"> </span><span class="ot">NA</span>
- <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>)
-}</code></pre></div>
+<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) {</a>
+<a class="sourceLine" id="cb8-2" data-line-number="2"> FOMC_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(</a>
+<a class="sourceLine" id="cb8-3" data-line-number="3"> <span class="dt">parent =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),</a>
+<a class="sourceLine" id="cb8-4" data-line-number="4"> <span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>))</a>
+<a class="sourceLine" id="cb8-5" data-line-number="5"></a>
+<a class="sourceLine" id="cb8-6" data-line-number="6"> b<span class="fl">.2</span> &lt;-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/rbenchmark/topics/benchmark">benchmark</a></span>(</a>
+<a class="sourceLine" id="cb8-7" data-line-number="7"> <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_<span class="dv">2006</span>_D,</a>
+<a class="sourceLine" id="cb8-8" data-line-number="8"> <span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),</a>
+<a class="sourceLine" id="cb8-9" data-line-number="9"> <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>),</a>
+<a class="sourceLine" id="cb8-10" data-line-number="10"> <span class="dt">replications =</span> <span class="dv">3</span>)</a>
+<a class="sourceLine" id="cb8-11" data-line-number="11"> <span class="kw">print</span>(b<span class="fl">.2</span>)</a>
+<a class="sourceLine" id="cb8-12" data-line-number="12"> factor_FOMC_SFO &lt;-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])</a>
+<a class="sourceLine" id="cb8-13" data-line-number="13">} <span class="cf">else</span> {</a>
+<a class="sourceLine" id="cb8-14" data-line-number="14"> factor_FOMC_SFO &lt;-<span class="st"> </span><span class="ot">NA</span></a>
+<a class="sourceLine" id="cb8-15" data-line-number="15"> <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>)</a>
+<a class="sourceLine" id="cb8-16" data-line-number="16">}</a></code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<pre><code>## test replications elapsed relative user.self sys.self
-## 2 deSolve, compiled 3 3.592 1.000 3.589 0
-## 1 deSolve, not compiled 3 35.340 9.839 35.324 0
+## 2 deSolve, compiled 3 3.720 1.000 3.718 0
+## 1 deSolve, not compiled 3 34.677 9.322 34.661 0
## user.child sys.child
## 2 0 0
## 1 0 0</code></pre>
-<p>Here we get a performance benefit of a factor of 10 using the version of the differential equation model compiled from C code!</p>
-<p>This vignette was built with mkin 0.9.47.1 on</p>
+<p>Here we get a performance benefit of a factor of 9 using the version of the differential equation model compiled from C code!</p>
+<p>This vignette was built with mkin 0.9.47.2 on</p>
<pre><code>## R version 3.5.1 (2018-07-02)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Debian GNU/Linux 9 (stretch)</code></pre>
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html
index 14a2f9b9..234c6885 100644
--- a/docs/articles/mkin.html
+++ b/docs/articles/mkin.html
@@ -84,7 +84,7 @@
<h1>Introduction to mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>mkin.Rmd</code></div>
@@ -98,34 +98,34 @@
<h1 class="hasAnchor">
<a href="#abstract" class="anchor"></a>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">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)
-<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">use_of_ff =</span> <span class="st">"max"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</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="op">/</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="op">/</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)
-
-<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> <span class="cf">function</span>(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>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># Define the kinetic model</span></a>
+<a class="sourceLine" id="cb1-3" data-line-number="3">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>),</a>
+<a class="sourceLine" id="cb1-4" data-line-number="4"> <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>),</a>
+<a class="sourceLine" id="cb1-5" data-line-number="5"> <span class="dt">M2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),</a>
+<a class="sourceLine" id="cb1-6" data-line-number="6"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-7" data-line-number="7"></a>
+<a class="sourceLine" id="cb1-8" data-line-number="8"></a>
+<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co"># Produce model predictions using some arbitrary parameters</span></a>
+<a class="sourceLine" id="cb1-10" data-line-number="10">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>)</a>
+<a class="sourceLine" id="cb1-11" data-line-number="11">d_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinpredict.html">mkinpredict</a></span>(m_SFO_SFO_SFO,</a>
+<a class="sourceLine" id="cb1-12" data-line-number="12"> <span class="kw">c</span>(<span class="dt">k_parent =</span> <span class="fl">0.03</span>,</a>
+<a class="sourceLine" id="cb1-13" data-line-number="13"> <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="op">/</span><span class="dv">100</span>,</a>
+<a class="sourceLine" id="cb1-14" data-line-number="14"> <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="op">/</span><span class="dv">50</span>),</a>
+<a class="sourceLine" id="cb1-15" data-line-number="15"> <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>),</a>
+<a class="sourceLine" id="cb1-16" data-line-number="16"> sampling_times)</a>
+<a class="sourceLine" id="cb1-17" data-line-number="17"></a>
+<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co"># Generate a dataset by adding normally distributed errors with</span></a>
+<a class="sourceLine" id="cb1-19" data-line-number="19"><span class="co"># standard deviation 3, for two replicates at each sampling time</span></a>
+<a class="sourceLine" id="cb1-20" data-line-number="20">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>,</a>
+<a class="sourceLine" id="cb1-21" data-line-number="21"> <span class="dt">sdfunc =</span> <span class="cf">function</span>(x) <span class="dv">3</span>,</a>
+<a class="sourceLine" id="cb1-22" data-line-number="22"> <span class="dt">n =</span> <span class="dv">1</span>, <span class="dt">seed =</span> <span class="dv">123456789</span> )</a>
+<a class="sourceLine" id="cb1-23" data-line-number="23"></a>
+<a class="sourceLine" id="cb1-24" data-line-number="24"><span class="co"># Fit the model to the dataset</span></a>
+<a class="sourceLine" id="cb1-25" data-line-number="25">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>)</a>
+<a class="sourceLine" id="cb1-26" data-line-number="26"></a>
+<a class="sourceLine" id="cb1-27" data-line-number="27"><span class="co"># Plot the results separately for parent and metabolites</span></a>
+<a class="sourceLine" id="cb1-28" data-line-number="28"><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>))</a></code></pre></div>
<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
</div>
<div id="background" class="section level1">
diff --git a/docs/articles/twa.html b/docs/articles/twa.html
index 0c5fe558..1a8a7eb2 100644
--- a/docs/articles/twa.html
+++ b/docs/articles/twa.html
@@ -84,7 +84,7 @@
<h1>Calculation of time weighted average concentrations with mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>twa.Rmd</code></div>

Contact - Imprint