aboutsummaryrefslogtreecommitdiff
path: root/docs/articles
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-12 16:34:00 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-12 16:34:00 +0200
commit6211f3ef4995657798686d8d4ab43ed9406e8a08 (patch)
tree4be80cf595880876d51c9cb85f07464b99bc8c83 /docs/articles
parentc7fcc2f8af47e95cf6164c00a4902340624c13dc (diff)
Update vignettes and docs
Diffstat (limited to 'docs/articles')
-rw-r--r--docs/articles/FOCUS_D.html12
-rw-r--r--docs/articles/FOCUS_L.html372
-rw-r--r--docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.pngbin38623 -> 38622 bytes
-rw-r--r--docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.pngbin23884 -> 23881 bytes
-rw-r--r--docs/articles/index.html2
-rw-r--r--docs/articles/twa.html35
-rw-r--r--docs/articles/web_only/FOCUS_Z.html285
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.pngbin85185 -> 88629 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.pngbin128361 -> 133233 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.pngbin127413 -> 132503 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.pngbin95903 -> 99562 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.pngbin22086 -> 22624 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.pngbin85869 -> 88629 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.pngbin85461 -> 88213 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.pngbin102008 -> 104162 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.pngbin128536 -> 133001 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.pngbin128135 -> 132462 bytes
-rw-r--r--docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.pngbin108179 -> 110760 bytes
-rw-r--r--docs/articles/web_only/NAFTA_examples.html281
-rw-r--r--docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.pngbin66710 -> 66709 bytes
-rw-r--r--docs/articles/web_only/benchmarks.html189
-rw-r--r--docs/articles/web_only/compiled_models.html172
22 files changed, 653 insertions, 695 deletions
diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html
index 0a9ddf4a..10b8f685 100644
--- a/docs/articles/FOCUS_D.html
+++ b/docs/articles/FOCUS_D.html
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -97,7 +97,7 @@
<h1 data-toc-skip>Example evaluation of FOCUS Example Dataset D</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2020-05-11</h4>
+ <h4 class="date">2020-05-12</h4>
<small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_D.Rmd"><code>vignettes/FOCUS_D.Rmd</code></a></small>
<div class="hidden name"><code>FOCUS_D.Rmd</code></div>
@@ -175,10 +175,10 @@
<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" id="cb11"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">fit</span>)</pre></body></html></div>
-<pre><code>## mkin version used for fitting: 0.9.50
+<pre><code>## mkin version used for fitting: 0.9.50.2
## R version used for fitting: 4.0.0
-## Date of fit: Mon May 11 05:14:41 2020
-## Date of summary: Mon May 11 05:14:41 2020
+## Date of fit: Tue May 12 15:31:36 2020
+## Date of summary: Tue May 12 15:31:36 2020
##
## Equations:
## d_parent/dt = - k_parent * parent
@@ -186,7 +186,7 @@
##
## Model predictions using solution type analytical
##
-## Fitted using 421 model solutions performed in 0.167 s
+## Fitted using 421 model solutions performed in 0.165 s
##
## Error model: Constant variance
##
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 4033beba..742718cb 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -6,19 +6,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example evaluation of FOCUS Laboratory Data L1 to L3 • mkin</title>
-<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
-<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><meta property="og:title" content="Example evaluation of FOCUS Laboratory Data L1 to L3">
-<meta property="og:description" content="">
-<meta name="twitter:card" content="summary">
+<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.6</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -74,7 +74,14 @@
<a href="../news/index.html">News</a>
</li>
</ul>
-<ul class="nav navbar-nav navbar-right"></ul>
+<ul class="nav navbar-nav navbar-right">
+<li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
</div>
<!--/.nav-collapse -->
</div>
@@ -87,12 +94,12 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
+ <h1 data-toc-skip>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-11-01</h4>
-
+ <h4 class="date">2020-05-12</h4>
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_L.Rmd"><code>vignettes/FOCUS_L.Rmd</code></a></small>
<div class="hidden name"><code>FOCUS_L.Rmd</code></div>
</div>
@@ -103,28 +110,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" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
-<a class="sourceLine" id="cb1-2" title="2">FOCUS_<span class="dv">2006</span>_L1 =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
-<a class="sourceLine" id="cb1-3" title="3"> <span class="dt">t =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="4"> <span class="dt">parent =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="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" title="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>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">FOCUS_2006_L1</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(
+ <span class="kw">t</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">2</span>, <span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">21</span>, <span class="fl">30</span>), <span class="kw">each</span> <span class="kw">=</span> <span class="fl">2</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></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>))
+<span class="no">FOCUS_2006_L1_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L1</span>)</pre></body></html></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" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="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" title="2"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(m.L1.SFO)</a></code></pre></div>
-<pre><code>## mkin version used for fitting: 0.9.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:46 2019
-## Date of summary: Fri Nov 1 10:10:46 2019
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">m.L1.SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, <span class="no">FOCUS_2006_L1_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L1.SFO</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:38 2020
+## Date of summary: Tue May 12 15:31:38 2020
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 133 model solutions performed in 0.287 s
+## Fitted using 133 model solutions performed in 0.03 s
##
## Error model: Constant variance
##
@@ -143,6 +150,11 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 93.88778 96.5589 -43.94389
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 92.470 1.28200 89.740 95.200
@@ -151,9 +163,9 @@
##
## Parameter correlation:
## parent_0 log_k_parent_sink sigma
-## parent_0 1.000e+00 6.186e-01 -1.712e-09
-## log_k_parent_sink 6.186e-01 1.000e+00 -3.237e-09
-## sigma -1.712e-09 -3.237e-09 1.000e+00
+## parent_0 1.000e+00 6.186e-01 -1.516e-09
+## log_k_parent_sink 6.186e-01 1.000e+00 -3.124e-09
+## sigma -1.516e-09 -3.124e-09 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -169,10 +181,6 @@
## All data 3.424 2 7
## parent 3.424 2 7
##
-## Resulting formation fractions:
-## ff
-## parent_sink 1
-##
## Estimated disappearance times:
## DT50 DT90
## parent 7.249 24.08
@@ -198,26 +206,26 @@
## 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" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></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>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L1.SFO</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L1 - SFO"</span>)</pre></body></html></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" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="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>
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="../reference/mkinresplot.html">mkinresplot</a></span>(<span class="no">m.L1.SFO</span>, <span class="kw">ylab</span> <span class="kw">=</span> <span class="st">"Observed"</span>, <span class="kw">xlab</span> <span class="kw">=</span> <span class="st">"Time"</span>)</pre></body></html></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" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="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></code></pre></div>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">m.L1.FOMC</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, <span class="no">FOCUS_2006_L1_mkin</span>, <span class="kw">quiet</span><span class="kw">=</span><span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation did not converge:
## false convergence (8)</code></pre>
-<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></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>
+<div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L1 - FOMC"</span>)</pre></body></html></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-6-1.png" width="576"></p>
-<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
-<pre><code>## mkin version used for fitting: 0.9.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:48 2019
-## Date of summary: Fri Nov 1 10:10:48 2019
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:38 2020
+## Date of summary: Tue May 12 15:31:38 2020
##
##
## Warning: Optimisation did not converge:
@@ -229,7 +237,7 @@
##
## Model predictions using solution type analytical
##
-## Fitted using 899 model solutions performed in 1.91 s
+## Fitted using 380 model solutions performed in 0.081 s
##
## Error model: Constant variance
##
@@ -250,29 +258,34 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 95.88778 99.44927 -43.94389
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
-## parent_0 92.47 1.2800 89.730 95.220
-## log_alpha 10.58 NaN NaN NaN
-## log_beta 12.93 NaN NaN NaN
-## sigma 2.78 0.4507 1.813 3.747
+## parent_0 92.47 1.2820 89.720 95.220
+## log_alpha 16.92 NaN NaN NaN
+## log_beta 19.26 NaN NaN NaN
+## sigma 2.78 0.4501 1.814 3.745
##
## Parameter correlation:
-## parent_0 log_alpha log_beta sigma
-## parent_0 1.00000 NaN NaN 0.01452
-## log_alpha NaN 1 NaN NaN
-## log_beta NaN NaN 1 NaN
-## sigma 0.01452 NaN NaN 1.00000
+## parent_0 log_alpha log_beta sigma
+## parent_0 1.000000 NaN NaN 0.002218
+## log_alpha NaN 1 NaN NaN
+## log_beta NaN NaN 1 NaN
+## sigma 0.002218 NaN NaN 1.000000
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
## t-test (unrealistically) based on the assumption of normal distribution
## for estimators of untransformed parameters.
-## Estimate t value Pr(&gt;t) Lower Upper
-## parent_0 92.47 72.13000 1.052e-19 89.730 95.220
-## alpha 39440.00 0.02397 4.906e-01 NA NA
-## beta 412500.00 0.02397 4.906e-01 NA NA
-## sigma 2.78 6.00000 1.628e-05 1.813 3.747
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 9.247e+01 NA NA 89.720 95.220
+## alpha 2.223e+07 NA NA NA NA
+## beta 2.325e+08 NA NA NA NA
+## sigma 2.780e+00 NA NA 1.814 3.745
##
## FOCUS Chi2 error levels in percent:
## err.min n.optim df
@@ -280,8 +293,8 @@
## parent 3.619 3 6
##
## Estimated disappearance times:
-## DT50 DT90 DT50back
-## parent 7.249 24.08 7.249</code></pre>
+## DT50 DT90 DT50back
+## parent 7.25 24.08 7.25</code></pre>
<p>We get a warning that the default optimisation algorithm <code>Port</code> did not converge, which is an indication that the model is overparameterised, <em>i.e.</em> contains too many parameters that are ill-defined as a consequence.</p>
<p>And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the <span class="math inline">\(\chi^2\)</span> error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters <code>log_alpha</code> and <code>log_beta</code> internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of <code>alpha</code> and <code>beta</code>. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of <code>log_alpha</code> and <code>log_beta</code> is 1.000, clearly indicating that the model is overparameterised.</p>
<p>The <span class="math inline">\(\chi^2\)</span> error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same <span class="math inline">\(\chi^2\)</span> error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of <span class="math inline">\(\chi^2\)</span> error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt <span class="citation">(Ranke 2014)</span>.</p>
@@ -290,19 +303,19 @@
<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" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1">FOCUS_<span class="dv">2006</span>_L2 =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
-<a class="sourceLine" id="cb14-2" title="2"> <span class="dt">t =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb14-3" title="3"> <span class="dt">parent =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb14-4" title="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="cb14-5" title="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="cb14-6" title="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 class="sourceCode" id="cb14"><html><body><pre class="r"><span class="no">FOCUS_2006_L2</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(
+ <span class="kw">t</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">28</span>), <span class="kw">each</span> <span class="kw">=</span> <span class="fl">2</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></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>))
+<span class="no">FOCUS_2006_L2_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L2</span>)</pre></body></html></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" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" title="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="cb15-2" title="2"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></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="cb15-3" title="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - SFO"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb15"><html><body><pre class="r"><span class="no">m.L2.SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, <span class="no">FOCUS_2006_L2_mkin</span>, <span class="kw">quiet</span><span class="kw">=</span><span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L2.SFO</span>, <span class="kw">show_residuals</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - SFO"</span>)</pre></body></html></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>
@@ -312,22 +325,22 @@
<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" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" title="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="cb16-2" title="2"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(m.L2.FOMC, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>,</a>
-<a class="sourceLine" id="cb16-3" title="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - FOMC"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="no">m.L2.FOMC</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, <span class="no">FOCUS_2006_L2_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L2.FOMC</span>, <span class="kw">show_residuals</span> <span class="kw">=</span> <span class="fl">TRUE</span>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - FOMC"</span>)</pre></body></html></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-9-1.png" width="672"></p>
-<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:49 2019
-## Date of summary: Fri Nov 1 10:10:49 2019
+<div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:39 2020
+## Date of summary: Tue May 12 15:31:39 2020
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 239 model solutions performed in 0.489 s
+## Fitted using 239 model solutions performed in 0.047 s
##
## Error model: Constant variance
##
@@ -348,6 +361,11 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 61.78966 63.72928 -26.89483
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 93.7700 1.6130 90.05000 97.4900
@@ -357,10 +375,10 @@
##
## Parameter correlation:
## parent_0 log_alpha log_beta sigma
-## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.637e-09
+## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.436e-09
## log_alpha -1.151e-01 1.000e+00 9.741e-01 -1.617e-07
-## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.387e-07
-## sigma -7.637e-09 -1.617e-07 -1.387e-07 1.000e+00
+## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.386e-07
+## sigma -7.436e-09 -1.617e-07 -1.386e-07 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -386,24 +404,24 @@
<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" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" title="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="cb19-2" title="2"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></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="cb19-3" title="3"> <span class="dt">main =</span> <span class="st">"FOCUS L2 - DFOP"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb19"><html><body><pre class="r"><span class="no">m.L2.DFOP</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, <span class="no">FOCUS_2006_L2_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L2.DFOP</span>, <span class="kw">show_residuals</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - DFOP"</span>)</pre></body></html></div>
<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-10-1.png" width="672"></p>
-<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:51 2019
-## Date of summary: Fri Nov 1 10:10:51 2019
+<div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.DFOP</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:39 2020
+## Date of summary: Tue May 12 15:31:39 2020
##
## Equations:
-## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
-## exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
-## exp(-k2 * time))) * parent
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+## * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 572 model solutions performed in 1.218 s
+## Fitted using 572 model solutions performed in 0.13 s
##
## Error model: Constant variance
##
@@ -426,21 +444,26 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 52.36695 54.79148 -21.18347
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 93.9500 9.998e-01 91.5900 96.3100
-## log_k1 3.1370 2.376e+03 -5616.0000 5622.0000
+## log_k1 3.1370 2.376e+03 -5615.0000 5622.0000
## log_k2 -1.0880 6.285e-02 -1.2370 -0.9394
## g_ilr -0.2821 7.033e-02 -0.4484 -0.1158
## sigma 1.4140 2.886e-01 0.7314 2.0960
##
## Parameter correlation:
## parent_0 log_k1 log_k2 g_ilr sigma
-## parent_0 1.000e+00 5.155e-07 2.371e-09 2.665e-01 -6.849e-09
-## log_k1 5.155e-07 1.000e+00 8.434e-05 -1.659e-04 -7.791e-06
-## log_k2 2.371e-09 8.434e-05 1.000e+00 -7.903e-01 -1.262e-08
-## g_ilr 2.665e-01 -1.659e-04 -7.903e-01 1.000e+00 3.241e-08
-## sigma -6.849e-09 -7.791e-06 -1.262e-08 3.241e-08 1.000e+00
+## parent_0 1.000e+00 5.157e-07 2.376e-09 2.665e-01 -6.837e-09
+## log_k1 5.157e-07 1.000e+00 8.434e-05 -1.659e-04 -7.786e-06
+## log_k2 2.376e-09 8.434e-05 1.000e+00 -7.903e-01 -1.263e-08
+## g_ilr 2.665e-01 -1.659e-04 -7.903e-01 1.000e+00 3.248e-08
+## sigma -6.837e-09 -7.786e-06 -1.263e-08 3.248e-08 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -468,18 +491,18 @@
<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" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" title="1">FOCUS_<span class="dv">2006</span>_L3 =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
-<a class="sourceLine" id="cb22-2" title="2"> <span class="dt">t =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb22-3" title="3"> <span class="dt">parent =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb22-4" title="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 class="sourceCode" id="cb22"><html><body><pre class="r"><span class="no">FOCUS_2006_L3</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(
+ <span class="kw">t</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">91</span>, <span class="fl">120</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">97.8</span>, <span class="fl">60</span>, <span class="fl">51</span>, <span class="fl">43</span>, <span class="fl">35</span>, <span class="fl">22</span>, <span class="fl">15</span>, <span class="fl">12</span>))
+<span class="no">FOCUS_2006_L3_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L3</span>)</pre></body></html></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" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="co"># Only use one core here, not to offend the CRAN checks</span></a>
-<a class="sourceLine" id="cb23-2" title="2">mm.L3 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb23-3" title="3"> <span class="kw"><a href="https://rdrr.io/r/base/list.html">list</a></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="cb23-4" title="4"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(mm.L3)</a></code></pre></div>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="co"># Only use one core here, not to offend the CRAN checks</span>
+<span class="no">mm.L3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>), <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>,
+ <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"FOCUS L3"</span> <span class="kw">=</span> <span class="no">FOCUS_2006_L3_mkin</span>), <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">mm.L3</span>)</pre></body></html></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>
@@ -488,20 +511,20 @@
<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" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:53 2019
-## Date of summary: Fri Nov 1 10:10:53 2019
+<div class="sourceCode" id="cb24"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L3</span><span class="kw">[[</span><span class="st">"DFOP"</span>, <span class="fl">1</span>]])</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:39 2020
+## Date of summary: Tue May 12 15:31:40 2020
##
## Equations:
-## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
-## exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
-## exp(-k2 * time))) * parent
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+## * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 373 model solutions performed in 0.784 s
+## Fitted using 373 model solutions performed in 0.083 s
##
## Error model: Constant variance
##
@@ -524,6 +547,11 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 32.97732 33.37453 -11.48866
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 97.7500 1.01900 94.5000 101.000000
@@ -534,11 +562,11 @@
##
## Parameter correlation:
## parent_0 log_k1 log_k2 g_ilr sigma
-## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -6.872e-07
-## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 3.200e-07
-## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 7.673e-07
-## g_ilr 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -8.731e-07
-## sigma -6.872e-07 3.200e-07 7.673e-07 -8.731e-07 1.000e+00
+## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -6.868e-07
+## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 3.175e-07
+## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 7.631e-07
+## g_ilr 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -8.694e-07
+## sigma -6.868e-07 3.175e-07 7.631e-07 -8.694e-07 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -570,7 +598,7 @@
## 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" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></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>
+<div class="sourceCode" id="cb26"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">mm.L3</span><span class="kw">[[</span><span class="st">"DFOP"</span>, <span class="fl">1</span>]], <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></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>
@@ -580,30 +608,30 @@
<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" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb27-1" title="1">FOCUS_<span class="dv">2006</span>_L4 =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
-<a class="sourceLine" id="cb27-2" title="2"> <span class="dt">t =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb27-3" title="3"> <span class="dt">parent =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb27-4" title="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>
+<div class="sourceCode" id="cb27"><html><body><pre class="r"><span class="no">FOCUS_2006_L4</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(
+ <span class="kw">t</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">91</span>, <span class="fl">120</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></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>))
+<span class="no">FOCUS_2006_L4_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L4</span>)</pre></body></html></div>
<p>Fits of the SFO and FOMC models, plots and summaries are produced below:</p>
-<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" title="1"><span class="co"># Only use one core here, not to offend the CRAN checks</span></a>
-<a class="sourceLine" id="cb28-2" title="2">mm.L4 &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb28-3" title="3"> <span class="kw"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L4_mkin),</a>
-<a class="sourceLine" id="cb28-4" title="4"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
-<a class="sourceLine" id="cb28-5" title="5"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(mm.L4)</a></code></pre></div>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="co"># Only use one core here, not to offend the CRAN checks</span>
+<span class="no">mm.L4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>), <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>,
+ <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"FOCUS L4"</span> <span class="kw">=</span> <span class="no">FOCUS_2006_L4_mkin</span>),
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">mm.L4</span>)</pre></body></html></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" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:53 2019
-## Date of summary: Fri Nov 1 10:10:54 2019
+<div class="sourceCode" id="cb29"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"SFO"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:40 2020
+## Date of summary: Tue May 12 15:31:40 2020
##
## Equations:
## d_parent/dt = - k_parent_sink * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 142 model solutions performed in 0.292 s
+## Fitted using 142 model solutions performed in 0.029 s
##
## Error model: Constant variance
##
@@ -622,6 +650,11 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 47.12133 47.35966 -20.56067
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 96.440 1.69900 92.070 100.800
@@ -630,9 +663,9 @@
##
## Parameter correlation:
## parent_0 log_k_parent_sink sigma
-## parent_0 1.000e+00 5.938e-01 3.440e-07
-## log_k_parent_sink 5.938e-01 1.000e+00 5.885e-07
-## sigma 3.440e-07 5.885e-07 1.000e+00
+## parent_0 1.000e+00 5.938e-01 3.387e-07
+## log_k_parent_sink 5.938e-01 1.000e+00 5.830e-07
+## sigma 3.387e-07 5.830e-07 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -648,25 +681,21 @@
## All data 3.287 2 6
## parent 3.287 2 6
##
-## Resulting formation fractions:
-## ff
-## parent_sink 1
-##
## Estimated disappearance times:
## DT50 DT90
## parent 106 352</code></pre>
-<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.49.6
-## R version used for fitting: 3.6.1
-## Date of fit: Fri Nov 1 10:10:54 2019
-## Date of summary: Fri Nov 1 10:10:54 2019
+<div class="sourceCode" id="cb31"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"FOMC"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.2
+## R version used for fitting: 4.0.0
+## Date of fit: Tue May 12 15:31:40 2020
+## Date of summary: Tue May 12 15:31:40 2020
##
## Equations:
## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
##
## Model predictions using solution type analytical
##
-## Fitted using 224 model solutions performed in 0.455 s
+## Fitted using 224 model solutions performed in 0.044 s
##
## Error model: Constant variance
##
@@ -687,6 +716,11 @@
## Fixed parameter values:
## None
##
+## Results:
+##
+## AIC BIC logLik
+## 40.37255 40.69032 -16.18628
+##
## Optimised, transformed parameters with symmetric confidence intervals:
## Estimate Std. Error Lower Upper
## parent_0 99.1400 1.2670 95.6300 102.7000
@@ -696,10 +730,10 @@
##
## Parameter correlation:
## parent_0 log_alpha log_beta sigma
-## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.563e-07
-## log_alpha -4.696e-01 1.000e+00 9.889e-01 4.066e-08
-## log_beta -5.543e-01 9.889e-01 1.000e+00 6.818e-08
-## sigma -2.563e-07 4.066e-08 6.818e-08 1.000e+00
+## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.456e-07
+## log_alpha -4.696e-01 1.000e+00 9.889e-01 2.169e-08
+## log_beta -5.543e-01 9.889e-01 1.000e+00 4.910e-08
+## sigma -2.456e-07 2.169e-08 4.910e-08 1.000e+00
##
## Backtransformed parameters:
## Confidence intervals for internally transformed parameters are asymmetric.
@@ -731,31 +765,11 @@
</div>
</div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
- <div id="tocnav">
- <h2 class="hasAnchor">
-<a href="#tocnav" class="anchor"></a>Contents</h2>
- <ul class="nav nav-pills nav-stacked">
-<li><a href="#laboratory-data-l1">Laboratory Data L1</a></li>
- <li>
-<a href="#laboratory-data-l2">Laboratory Data L2</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#sfo-fit-for-l2">SFO fit for L2</a></li>
- <li><a href="#fomc-fit-for-l2">FOMC fit for L2</a></li>
- <li><a href="#dfop-fit-for-l2">DFOP fit for L2</a></li>
- </ul>
-</li>
- <li>
-<a href="#laboratory-data-l3">Laboratory Data L3</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#fit-multiple-models">Fit multiple models</a></li>
- <li><a href="#accessing-mmkin-objects">Accessing mmkin objects</a></li>
- </ul>
-</li>
- <li><a href="#laboratory-data-l4">Laboratory Data L4</a></li>
- <li><a href="#references">References</a></li>
- </ul>
+ <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
+ </nav>
</div>
- </div>
</div>
@@ -766,7 +780,7 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png
index 2e5071d9..db54326e 100644
--- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png
+++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png
Binary files differ
diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png
index 16235059..bfa271dd 100644
--- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png
+++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png
Binary files differ
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 6f97722c..5e32cfde 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -154,7 +154,7 @@
<dd></dt>
<dt><a href="web_only/NAFTA_examples.html">Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</a></dt>
<dd></dt>
- <dt><a href="web_only/benchmarks.html">Benchmark timings for mkin on various systems</a></dt>
+ <dt><a href="web_only/benchmarks.html">Benchmark timings for mkin</a></dt>
<dd></dt>
<dt><a href="web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></dt>
<dd></dt>
diff --git a/docs/articles/twa.html b/docs/articles/twa.html
index 8d8bac0e..b58306f1 100644
--- a/docs/articles/twa.html
+++ b/docs/articles/twa.html
@@ -6,19 +6,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculation of time weighted average concentrations with mkin • mkin</title>
-<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
-<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><meta property="og:title" content="Calculation of time weighted average concentrations with mkin">
-<meta property="og:description" content="">
-<meta name="twitter:card" content="summary">
+<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.6</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -74,7 +74,14 @@
<a href="../news/index.html">News</a>
</li>
</ul>
-<ul class="nav navbar-nav navbar-right"></ul>
+<ul class="nav navbar-nav navbar-right">
+<li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
</div>
<!--/.nav-collapse -->
</div>
@@ -87,12 +94,12 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1>Calculation of time weighted average concentrations with mkin</h1>
+ <h1 data-toc-skip>Calculation of time weighted average concentrations with mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-11-01</h4>
-
+ <h4 class="date">2020-05-12</h4>
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/twa.Rmd"><code>vignettes/twa.Rmd</code></a></small>
<div class="hidden name"><code>twa.Rmd</code></div>
</div>
@@ -138,7 +145,7 @@
</div>
</div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
</div>
@@ -151,7 +158,7 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html
index 14234785..0c34d77d 100644
--- a/docs/articles/web_only/FOCUS_Z.html
+++ b/docs/articles/web_only/FOCUS_Z.html
@@ -6,19 +6,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example evaluation of FOCUS dataset Z • mkin</title>
-<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
-<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
+<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
<script src="../../pkgdown.js"></script><meta property="og:title" content="Example evaluation of FOCUS dataset Z">
-<meta property="og:description" content="">
-<meta name="twitter:card" content="summary">
+<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.6</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -74,7 +74,14 @@
<a href="../../news/index.html">News</a>
</li>
</ul>
-<ul class="nav navbar-nav navbar-right"></ul>
+<ul class="nav navbar-nav navbar-right">
+<li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
</div>
<!--/.nav-collapse -->
</div>
@@ -87,12 +94,12 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1>Example evaluation of FOCUS dataset Z</h1>
+ <h1 data-toc-skip>Example evaluation of FOCUS dataset Z</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-11-01</h4>
-
+ <h4 class="date">2020-05-12</h4>
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/FOCUS_Z.Rmd"><code>vignettes/web_only/FOCUS_Z.Rmd</code></a></small>
<div class="hidden name"><code>FOCUS_Z.Rmd</code></div>
</div>
@@ -104,71 +111,71 @@
<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" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(mkin, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
-<a class="sourceLine" id="cb1-2" title="2">LOD =<span class="st"> </span><span class="fl">0.5</span></a>
-<a class="sourceLine" id="cb1-3" title="3">FOCUS_<span class="dv">2006</span>_Z =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
-<a class="sourceLine" id="cb1-4" title="4"> <span class="dt">t =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="6"> <span class="dt">Z0 =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="8"> <span class="dt">Z1 =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="10"> <span class="dt">Z2 =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="12"> <span class="dt">Z3 =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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" title="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" title="14"></a>
-<a class="sourceLine" id="cb1-15" title="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 class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">mkin</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">LOD</span> <span class="kw">=</span> <span class="fl">0.5</span>
+<span class="no">FOCUS_2006_Z</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(
+ <span class="kw">t</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">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="fl">1</span>, <span class="fl">2</span>, <span class="fl">3</span>, <span class="fl">4</span>, <span class="fl">7</span>, <span class="fl">10</span>, <span class="fl">14</span>, <span class="fl">21</span>,
+ <span class="fl">42</span>, <span class="fl">61</span>, <span class="fl">96</span>, <span class="fl">124</span>),
+ <span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">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="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">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="fl">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="no">LOD</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">NA</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <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="no">LOD</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <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>))
+
+<span class="no">FOCUS_2006_Z_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_Z</span>)</pre></body></html></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" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="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" title="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>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">Z.2a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="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></code></pre></div>
-<pre><code>## Warning in mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE): Observations
-## with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><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>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="no">m.Z.2a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.2a</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.2a</span>)</pre></body></html></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png" width="700"></p>
-<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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.393176 2.8591e+01 6.4352e-21 91.66556 102.3642
-## k_Z0_sink 7.2231e-10 0.225254 3.2067e-09 5.0000e-01 0.00000 Inf
-## k_Z0_Z1 2.2360e+00 0.159134 1.4051e+01 1.1369e-13 1.95303 2.5600
-## k_Z1_sink 4.8212e-01 0.065454 7.3658e+00 5.1186e-08 0.40341 0.5762
-## sigma 4.8041e+00 0.637618 7.5345e+00 3.4431e-08 3.52677 6.0815</code></pre>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.2a</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
+<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
+## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642
+## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600
+## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762
+## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000
+## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815</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" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="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="cb9-2" title="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="cb9-3" title="3"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="no">Z.2a.ff</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="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></code></pre></div>
-<pre><code>## Warning in mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE): Observations
-## with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" title="1"><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>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="no">m.Z.2a.ff</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.2a.ff</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb13"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.2a.ff</span>)</pre></body></html></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png" width="700"></p>
-<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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>
+<div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.2a.ff</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642
## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600
-## k_Z1 0.48212 0.063265 7.6207 2.8155e-08 0.40341 0.5762
+## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762
## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000
## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815</code></pre>
<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" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" title="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="cb16-2" title="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>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="no">Z.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb18-1" title="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></code></pre></div>
+<div class="sourceCode" id="cb18"><html><body><pre class="r"><span class="no">m.Z.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.3</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
## value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1"><span class="kw"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.3</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.3</span>)</pre></body></html></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png" width="700"></p>
-<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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>
+<div class="sourceCode" id="cb21"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.3</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
## Z0_0 97.01488 2.597342 37.352 2.0106e-24 91.67597 102.3538
## k_Z0 2.23601 0.146904 15.221 9.1477e-15 1.95354 2.5593
@@ -180,52 +187,51 @@
<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" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="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="cb23-2" title="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="cb23-3" title="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>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="no">Z.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="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></code></pre></div>
+<div class="sourceCode" id="cb25"><html><body><pre class="r"><span class="no">m.Z.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.5</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
## value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb27-1" title="1"><span class="kw"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.5</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb27"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.5</span>)</pre></body></html></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" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" title="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="cb28-2" title="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="cb28-3" title="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="cb28-4" title="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="cb28-5" title="5"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="no">Z.FOCUS</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb30-1" title="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="cb30-2" title="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="cb30-3" title="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, : Observations with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" title="1"><span class="kw"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.FOCUS)</a></code></pre></div>
+<div class="sourceCode" id="cb30"><html><body><pre class="r"><span class="no">m.Z.FOCUS</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.FOCUS</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.5</span>$<span class="no">bparms.ode</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, :
+## Observations with value of zero were removed from the data</code></pre>
+<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation did not converge:
+## false convergence (8)</code></pre>
+<div class="sourceCode" id="cb33"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="700"></p>
-<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb33-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</a></code></pre></div>
+<div class="sourceCode" id="cb34"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.FOCUS</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
-## Z0_0 96.838607 1.994273 48.5584 4.0283e-42 92.826626 100.850589
-## k_Z0 2.215405 0.118459 18.7018 1.0415e-23 1.989465 2.467003
-## k_Z1 0.478300 0.028257 16.9267 6.2408e-22 0.424701 0.538662
-## k_Z2 0.451618 0.042138 10.7177 1.6308e-14 0.374328 0.544867
-## k_Z3 0.058693 0.015246 3.8498 1.7806e-04 0.034805 0.098978
-## f_Z2_to_Z3 0.471508 0.058352 8.0804 9.6648e-11 0.357735 0.588320
+## Z0_0 96.838721 1.994275 48.5584 4.0283e-42 92.826878 100.850563
+## k_Z0 2.215400 0.118459 18.7019 1.0414e-23 1.989462 2.466998
+## k_Z1 0.478301 0.028257 16.9267 6.2411e-22 0.424705 0.538662
+## k_Z2 0.451623 0.042138 10.7176 1.6313e-14 0.374336 0.544867
+## k_Z3 0.058694 0.015246 3.8499 1.7804e-04 0.034809 0.098967
+## f_Z2_to_Z3 0.471510 0.058352 8.0804 9.6640e-11 0.357775 0.588283
## sigma 3.984431 0.383402 10.3923 4.5575e-14 3.213126 4.755736</code></pre>
-<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb35-1" title="1"><span class="kw"><a href="../../reference/endpoints.html">endpoints</a></span>(m.Z.FOCUS)</a></code></pre></div>
+<div class="sourceCode" id="cb36"><html><body><pre class="r"><span class="fu"><a href="../../reference/endpoints.html">endpoints</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div>
<pre><code>## $ff
## Z2_Z3 Z2_sink
## 0.47151 0.52849
##
-## $SFORB
-## logical(0)
-##
## $distimes
## DT50 DT90
## Z0 0.31288 1.0394
## Z1 1.44919 4.8141
-## Z2 1.53481 5.0985
-## Z3 11.80965 39.2308</code></pre>
+## Z2 1.53479 5.0985
+## Z3 11.80955 39.2305</code></pre>
<p>This fit corresponds to the final result chosen in Appendix 7 of the FOCUS report. Confidence intervals returned by mkin are based on internally transformed parameters, however.</p>
</div>
<div id="using-the-sforb-model" class="section level1">
@@ -233,87 +239,85 @@
<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" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb37-1" title="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="cb37-2" title="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" title="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" title="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>
+<div class="sourceCode" id="cb38"><html><body><pre class="r"><span class="no">Z.mkin.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb39-1" title="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></code></pre></div>
-<pre><code>## Warning in mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE): Observations
-## with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb41"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb41-1" title="1"><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>
+<div class="sourceCode" id="cb40"><html><body><pre class="r"><span class="no">m.Z.mkin.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.1</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb42"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.1</span>)</pre></body></html></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png" width="700"></p>
-<div class="sourceCode" id="cb42"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb42-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/summary.html">summary</a></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>
+<div class="sourceCode" id="cb43"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.mkin.1</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">cov.unscaled</span></pre></body></html></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" id="cb44"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb44-1" title="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="cb44-2" title="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="cb44-3" title="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>
+<div class="sourceCode" id="cb45"><html><body><pre class="r"><span class="no">Z.mkin.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb46"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb46-1" title="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></code></pre></div>
-<pre><code>## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations
-## with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb48"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb48-1" title="1"><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>
+<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="no">m.Z.mkin.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.3</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb49"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.3</span>)</pre></body></html></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" id="cb49"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb49-1" title="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="cb49-2" title="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="cb49-3" title="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="cb49-4" title="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>
+<div class="sourceCode" id="cb50"><html><body><pre class="r"><span class="no">Z.mkin.4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb51"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb51-1" title="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="cb51-2" title="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="cb51-3" title="3"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb52"><html><body><pre class="r"><span class="no">m.Z.mkin.4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.4</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.mkin.3</span>$<span class="no">bparms.ode</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.
## 3$bparms.ode, : Observations with value of zero were removed from the data</code></pre>
-<div class="sourceCode" id="cb53"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb53-1" title="1"><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>
+<div class="sourceCode" id="cb54"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.4</span>)</pre></body></html></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" id="cb54"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb54-1" title="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="cb54-2" title="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="cb54-3" title="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="cb54-4" title="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>
+<div class="sourceCode" id="cb55"><html><body><pre class="r"><span class="no">Z.mkin.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb56"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb56-1" title="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="cb56-2" title="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="cb56-3" title="3"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb57"><html><body><pre class="r"><span class="no">m.Z.mkin.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.5</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.mkin.4</span>$<span class="no">bparms.ode</span>[<span class="fl">1</span>:<span class="fl">4</span>],
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.
-## 4$bparms.ode[1:4], : Observations with value of zero were removed from the
-## data</code></pre>
-<div class="sourceCode" id="cb58"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb58-1" title="1"><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>
+## 4$bparms.ode[1:4], : Observations with value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.5</span>)</pre></body></html></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" id="cb59"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb59-1" title="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="cb59-2" title="2"> <span class="dt">parms.ini =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></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="cb59-3" title="3"> <span class="dt">k_Z3_bound_free =</span> <span class="dv">0</span>),</a>
-<a class="sourceLine" id="cb59-4" title="4"> <span class="dt">fixed_parms =</span> <span class="st">"k_Z3_bound_free"</span>,</a>
-<a class="sourceLine" id="cb59-5" title="5"> <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb60"><html><body><pre class="r"><span class="no">m.Z.mkin.5a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.5</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">m.Z.mkin.5</span>$<span class="no">bparms.ode</span>[<span class="fl">1</span>:<span class="fl">7</span>],
+ <span class="kw">k_Z3_bound_free</span> <span class="kw">=</span> <span class="fl">0</span>),
+ <span class="kw">fixed_parms</span> <span class="kw">=</span> <span class="st">"k_Z3_bound_free"</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
<pre><code>## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = c(m.Z.mkin.
-## 5$bparms.ode[1:7], : Observations with value of zero were removed from the
-## data</code></pre>
-<div class="sourceCode" id="cb61"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb61-1" title="1"><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>
+## 5$bparms.ode[1:7], : Observations with value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb62"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></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" id="cb62"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb62-1" title="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>
+<div class="sourceCode" id="cb63"><html><body><pre class="r"><span class="fu"><a href="../../reference/mkinparplot.html">mkinparplot</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></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" id="cb63"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb63-1" title="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>
+<div class="sourceCode" id="cb64"><html><body><pre class="r"><span class="fu"><a href="../../reference/endpoints.html">endpoints</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></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
+## Z0_free Z2_Z3 Z2_sink Z3_free
+## 1.00000 0.53656 0.46344 1.00000
##
## $SFORB
## Z0_b1 Z0_b2 Z3_b1 Z3_b2
-## 2.4471381 0.0075124 0.0800075 0.0000000
+## 2.4471358 0.0075126 0.0800073 0.0000000
##
## $distimes
## DT50 DT90 DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2
-## Z0 0.3043 1.1848 0.28325 92.267 NA NA
+## Z0 0.3043 1.1848 0.28325 92.265 NA NA
## Z1 1.5148 5.0320 NA NA NA NA
## Z2 1.6414 5.4526 NA NA NA NA
-## Z3 NA NA NA NA 8.6635 Inf</code></pre>
+## Z3 NA NA NA NA 8.6636 Inf</code></pre>
<p>It is clear the degradation rate of Z3 towards the end of the experiment is very low as DT50_Z3_b2 (the second Eigenvalue of the system of two differential equations representing the SFORB system for Z3, corresponding to the slower rate constant of the DFOP model) is reported to be infinity. However, this appears to be a feature of the data.</p>
</div>
<div id="references" class="section level1">
@@ -328,20 +332,11 @@
</div>
</div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
- <div id="tocnav">
- <h2 class="hasAnchor">
-<a href="#tocnav" class="anchor"></a>Contents</h2>
- <ul class="nav nav-pills nav-stacked">
-<li><a href="#the-data">The data</a></li>
- <li><a href="#parent-and-one-metabolite">Parent and one metabolite</a></li>
- <li><a href="#metabolites-z2-and-z3">Metabolites Z2 and Z3</a></li>
- <li><a href="#using-the-sforb-model">Using the SFORB model</a></li>
- <li><a href="#references">References</a></li>
- </ul>
+ <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
+ </nav>
</div>
- </div>
</div>
@@ -352,7 +347,7 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png
index 76826836..23d051ce 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png
index 25249a9a..d3702fb6 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png
index f9c28e5a..4a6fce4f 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png
index 6926c367..dd6537b7 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png
index 7764f4e2..b986c30b 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png
index c84e21f1..23d051ce 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png
index 38805220..6e9f4efa 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png
index e1cbf084..146acea9 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png
index 30f6a0b7..47d806c0 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png
index 891d95e1..7db8b07d 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png
Binary files differ
diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png
index ea4f89e6..0c698299 100644
--- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png
+++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png
Binary files differ
diff --git a/docs/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html
index fecbe3b1..411341b8 100644
--- a/docs/articles/web_only/NAFTA_examples.html
+++ b/docs/articles/web_only/NAFTA_examples.html
@@ -6,19 +6,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance • mkin</title>
-<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
-<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
+<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
<script src="../../pkgdown.js"></script><meta property="og:title" content="Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance">
-<meta property="og:description" content="">
-<meta name="twitter:card" content="summary">
+<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.6</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -74,7 +74,14 @@
<a href="../../news/index.html">News</a>
</li>
</ul>
-<ul class="nav navbar-nav navbar-right"></ul>
+<ul class="nav navbar-nav navbar-right">
+<li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
</div>
<!--/.nav-collapse -->
</div>
@@ -87,12 +94,12 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</h1>
+ <h1 data-toc-skip>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2019-11-01</h4>
-
+ <h4 class="date">2020-05-12</h4>
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/NAFTA_examples.Rmd"><code>vignettes/web_only/NAFTA_examples.Rmd</code></a></small>
<div class="hidden name"><code>NAFTA_examples.Rmd</code></div>
</div>
@@ -112,12 +119,12 @@
<div id="example-on-page-5-upper-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-5-upper-panel" class="anchor"></a>Example on page 5, upper panel</h2>
-<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">p5a &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p5a"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">p5a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p5a"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p5a)</a></code></pre></div>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p5a</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p5a-1.png" width="700"></p>
-<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p5a)</a></code></pre></div>
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p5a</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 465.21753 56.27506 32.06401
@@ -143,7 +150,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 9.99e+01 1.41e-26 98.8116 101.0810
## k1 2.67e-02 5.05e-06 0.0243 0.0295
-## k2 2.86e-12 5.00e-01 0.0000 Inf
+## k2 2.17e-12 5.00e-01 0.0000 Inf
## g 6.47e-01 3.67e-06 0.6248 0.6677
## sigma 1.27e+00 8.91e-06 0.8395 1.6929
##
@@ -152,7 +159,7 @@
## DT50 DT90 DT50_rep
## SFO 67.7 2.25e+02 6.77e+01
## IORE 58.2 1.07e+03 3.22e+02
-## DFOP 55.5 4.42e+11 2.42e+11
+## DFOP 55.5 5.83e+11 3.20e+11
##
## Representative half-life:
## [1] 321.51</code></pre>
@@ -160,12 +167,12 @@
<div id="example-on-page-5-lower-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-5-lower-panel" class="anchor"></a>Example on page 5, lower panel</h2>
-<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">p5b &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p5b"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="no">p5b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p5b"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p5b)</a></code></pre></div>
+<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p5b</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p5b-1.png" width="700"></p>
-<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p5b)</a></code></pre></div>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p5b</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 94.81123 10.10936 7.55871
@@ -191,7 +198,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 9.84e+01 1.24e-27 97.8078 98.9187
## k1 1.55e-02 4.10e-04 0.0143 0.0167
-## k2 1.16e-11 5.00e-01 0.0000 Inf
+## k2 1.04e-11 5.00e-01 0.0000 Inf
## g 6.89e-01 2.92e-03 0.6626 0.7142
## sigma 6.48e-01 2.38e-05 0.4147 0.8813
##
@@ -200,7 +207,7 @@
## DT50 DT90 DT50_rep
## SFO 86.6 2.88e+02 8.66e+01
## IORE 85.5 7.17e+02 2.16e+02
-## DFOP 83.6 9.80e+10 5.98e+10
+## DFOP 83.6 1.09e+11 6.67e+10
##
## Representative half-life:
## [1] 215.87</code></pre>
@@ -208,12 +215,12 @@
<div id="example-on-page-6" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-6" class="anchor"></a>Example on page 6</h2>
-<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" title="1">p6 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p6"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb13"><html><body><pre class="r"><span class="no">p6</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p6"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p6)</a></code></pre></div>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p6</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p6-1.png" width="700"></p>
-<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p6)</a></code></pre></div>
+<div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p6</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 188.45361 51.00699 42.46931
@@ -239,7 +246,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 9.66e+01 1.57e-25 95.3476 97.8979
## k1 2.55e-02 7.33e-06 0.0233 0.0278
-## k2 4.90e-11 5.00e-01 0.0000 Inf
+## k2 3.88e-11 5.00e-01 0.0000 Inf
## g 8.61e-01 7.55e-06 0.8314 0.8867
## sigma 1.46e+00 6.93e-06 0.9661 1.9483
##
@@ -248,7 +255,7 @@
## DT50 DT90 DT50_rep
## SFO 38.6 1.28e+02 3.86e+01
## IORE 34.0 1.77e+02 5.32e+01
-## DFOP 34.1 6.66e+09 1.41e+10
+## DFOP 34.1 8.42e+09 1.79e+10
##
## Representative half-life:
## [1] 53.17</code></pre>
@@ -256,12 +263,12 @@
<div id="example-on-page-7" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-7" class="anchor"></a>Example on page 7</h2>
-<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" title="1">p7 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p7"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb19"><html><body><pre class="r"><span class="no">p7</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p7"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p7)</a></code></pre></div>
+<div class="sourceCode" id="cb22"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p7</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p7-1.png" width="700"></p>
-<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p7)</a></code></pre></div>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p7</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 3661.661 3195.030 3174.145
@@ -287,7 +294,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 9.89e+01 9.44e-49 95.4640 102.2573
## k1 1.81e-02 1.75e-01 0.0116 0.0281
-## k2 1.97e-10 5.00e-01 0.0000 Inf
+## k2 2.30e-10 5.00e-01 0.0000 Inf
## g 6.06e-01 2.19e-01 0.4826 0.7178
## sigma 7.40e+00 2.97e-15 6.0201 8.7754
##
@@ -296,7 +303,7 @@
## DT50 DT90 DT50_rep
## SFO 94.3 3.13e+02 9.43e+01
## IORE 96.7 1.51e+03 4.55e+02
-## DFOP 96.4 6.97e+09 3.52e+09
+## DFOP 96.4 5.95e+09 3.01e+09
##
## Representative half-life:
## [1] 454.55</code></pre>
@@ -309,12 +316,12 @@
<h2 class="hasAnchor">
<a href="#example-on-page-8" class="anchor"></a>Example on page 8</h2>
<p>For this dataset, the IORE fit does not converge when the default starting values used by mkin for the IORE model are used. Therefore, a lower value for the rate constant is used here.</p>
-<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="1">p8 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p8"</span>]], <span class="dt">parms.ini =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dt">k__iore_parent_sink =</span> <span class="fl">1e-3</span>))</a></code></pre></div>
+<div class="sourceCode" id="cb25"><html><body><pre class="r"><span class="no">p8</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p8"</span>]], <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="kw">k__iore_parent_sink</span> <span class="kw">=</span> <span class="fl">1e-3</span>))</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p8)</a></code></pre></div>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p8</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p8-1.png" width="700"></p>
-<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb29-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p8)</a></code></pre></div>
+<div class="sourceCode" id="cb29"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p8</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 1996.9408 444.9237 547.5616
@@ -361,12 +368,12 @@
<div id="example-on-page-9-upper-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-9-upper-panel" class="anchor"></a>Example on page 9, upper panel</h2>
-<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb31-1" title="1">p9a &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p9a"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb31"><html><body><pre class="r"><span class="no">p9a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p9a"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb34-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p9a)</a></code></pre></div>
+<div class="sourceCode" id="cb34"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9a</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p9a-1.png" width="700"></p>
-<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb35-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p9a)</a></code></pre></div>
+<div class="sourceCode" id="cb35"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9a</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 839.35238 88.57064 9.93363
@@ -392,7 +399,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 9.85e+01 2.54e-20 97.390 99.672
## k1 1.38e-01 3.52e-05 0.131 0.146
-## k2 6.02e-13 5.00e-01 0.000 Inf
+## k2 6.69e-13 5.00e-01 0.000 Inf
## g 6.52e-01 8.13e-06 0.642 0.661
## sigma 7.88e-01 6.13e-02 0.481 1.095
##
@@ -401,7 +408,7 @@
## DT50 DT90 DT50_rep
## SFO 16.9 5.63e+01 1.69e+01
## IORE 11.6 3.37e+02 1.01e+02
-## DFOP 10.5 2.07e+12 1.15e+12
+## DFOP 10.5 1.86e+12 1.04e+12
##
## Representative half-life:
## [1] 101.43</code></pre>
@@ -410,17 +417,12 @@
<div id="example-on-page-9-lower-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-9-lower-panel" class="anchor"></a>Example on page 9, lower panel</h2>
-<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb37-1" title="1">p9b &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p9b"</span>]])</a></code></pre></div>
-<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<div class="sourceCode" id="cb37"><html><body><pre class="r"><span class="no">p9b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p9b"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb44"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb44-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p9b)</a></code></pre></div>
+<div class="sourceCode" id="cb40"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9b</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p9b-1.png" width="700"></p>
-<div class="sourceCode" id="cb45"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb45-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p9b)</a></code></pre></div>
+<div class="sourceCode" id="cb41"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9b</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 35.64867 23.22334 35.64867
@@ -447,7 +449,7 @@
## parent_0 94.7123 1.61e-16 93.1355 96.2891
## k1 0.0389 1.43e-06 0.0312 0.0485
## k2 0.0389 6.67e-03 0.0186 0.0812
-## g 0.7742 NaN NA NA
+## g 0.7742 5.00e-01 0.0000 1.0000
## sigma 1.5957 2.50e-04 0.9135 2.2779
##
##
@@ -464,12 +466,12 @@
<div id="example-on-page-10" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-10" class="anchor"></a>Example on page 10</h2>
-<div class="sourceCode" id="cb47"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb47-1" title="1">p10 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p10"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb43"><html><body><pre class="r"><span class="no">p10</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p10"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb50"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb50-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p10)</a></code></pre></div>
+<div class="sourceCode" id="cb46"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p10</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p10-1.png" width="700"></p>
-<div class="sourceCode" id="cb51"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb51-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p10)</a></code></pre></div>
+<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p10</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 899.4089 336.4348 899.4089
@@ -492,12 +494,12 @@
## sigma 4.90 1.77e-04 2.837 6.968
##
## $DFOP
-## Estimate Pr(&gt;t) Lower Upper
-## parent_0 101.7315 1.41e-09 91.6534 111.8097
-## k1 0.0495 6.42e-04 0.0301 0.0814
-## k2 0.0495 1.66e-02 0.0200 0.1225
-## g 0.6634 5.00e-01 0.0000 1.0000
-## sigma 8.0152 2.50e-04 4.5886 11.4418
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 101.7315 1.41e-09 91.6534 111.810
+## k1 0.0495 6.48e-04 0.0303 0.081
+## k2 0.0495 1.67e-02 0.0201 0.122
+## g 0.6634 5.00e-01 0.0000 1.000
+## sigma 8.0152 2.50e-04 4.5886 11.442
##
##
## DTx values:
@@ -517,12 +519,12 @@
<div id="example-on-page-11" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-11" class="anchor"></a>Example on page 11</h2>
-<div class="sourceCode" id="cb53"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb53-1" title="1">p11 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p11"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb49"><html><body><pre class="r"><span class="no">p11</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p11"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb56"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb56-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p11)</a></code></pre></div>
+<div class="sourceCode" id="cb52"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p11</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p11-1.png" width="700"></p>
-<div class="sourceCode" id="cb57"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb57-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p11)</a></code></pre></div>
+<div class="sourceCode" id="cb53"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p11</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 579.6805 204.7932 144.7783
@@ -560,7 +562,7 @@
## DFOP 4.21e+11 2.64e+12 9.56e+11
##
## Representative half-life:
-## [1] 41148169</code></pre>
+## [1] 41148171</code></pre>
<p>In this case, the DFOP fit reported for PestDF resulted in a negative value for the slower rate constant, which is not possible in mkin. The other results are in agreement.</p>
</div>
</div>
@@ -571,14 +573,14 @@
<div id="example-on-page-12-upper-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-12-upper-panel" class="anchor"></a>Example on page 12, upper panel</h2>
-<div class="sourceCode" id="cb59"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb59-1" title="1">p12a &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p12a"</span>]])</a></code></pre></div>
-<pre><code>## Warning in summary.mkinfit(x): Could not calculate correlation; no
-## covariance matrix</code></pre>
+<div class="sourceCode" id="cb55"><html><body><pre class="r"><span class="no">p12a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12a"</span>]])</pre></body></html></div>
+<pre><code>## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
+## matrix</code></pre>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb63"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb63-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p12a)</a></code></pre></div>
+<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12a</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p12a-1.png" width="700"></p>
-<div class="sourceCode" id="cb64"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb64-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p12a)</a></code></pre></div>
+<div class="sourceCode" id="cb60"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12a</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 695.4440 220.0685 695.4440
@@ -603,8 +605,8 @@
## $DFOP
## Estimate Pr(&gt;t) Lower Upper
## parent_0 100.521 2.74e-10 92.2366 108.805
-## k1 0.124 5.74e-06 0.0958 0.161
-## k2 0.124 6.61e-02 0.0319 0.484
+## k1 0.124 5.75e-06 0.0958 0.161
+## k2 0.124 6.72e-02 0.0319 0.484
## g 0.877 5.00e-01 0.0000 1.000
## sigma 7.048 2.50e-04 4.0349 10.061
##
@@ -621,20 +623,20 @@
<div id="example-on-page-12-lower-panel" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-12-lower-panel" class="anchor"></a>Example on page 12, lower panel</h2>
-<div class="sourceCode" id="cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb66-1" title="1">p12b &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p12b"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb62"><html><body><pre class="r"><span class="no">p12b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12b"</span>]])</pre></body></html></div>
<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in qt(alpha/2, rdf): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in qt(1 - alpha/2, rdf): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb76"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb76-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p12b)</a></code></pre></div>
+<div class="sourceCode" id="cb72"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12b</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p12b-1.png" width="700"></p>
-<div class="sourceCode" id="cb77"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb77-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p12b)</a></code></pre></div>
+<div class="sourceCode" id="cb73"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12b</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 58.90242 19.06353 58.90242
@@ -677,16 +679,12 @@
<div id="example-on-page-13" class="section level2">
<h2 class="hasAnchor">
<a href="#example-on-page-13" class="anchor"></a>Example on page 13</h2>
-<div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb79-1" title="1">p13 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p13"</span>]])</a></code></pre></div>
-<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<div class="sourceCode" id="cb75"><html><body><pre class="r"><span class="no">p13</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p13"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb85-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p13)</a></code></pre></div>
+<div class="sourceCode" id="cb78"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p13</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p13-1.png" width="700"></p>
-<div class="sourceCode" id="cb86"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb86-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p13)</a></code></pre></div>
+<div class="sourceCode" id="cb79"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p13</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 174.5971 142.3951 174.5971
@@ -711,9 +709,9 @@
## $DFOP
## Estimate Pr(&gt;t) Lower Upper
## parent_0 92.73500 9.25e-15 8.95e+01 9.59e+01
-## k1 0.00258 4.28e-01 1.70e-08 3.92e+02
+## k1 0.00258 4.28e-01 1.45e-08 4.61e+02
## k2 0.00258 3.69e-08 2.20e-03 3.03e-03
-## g 0.00442 5.00e-01 NA NA
+## g 0.00442 5.00e-01 0.00e+00 1.00e+00
## sigma 3.41172 1.35e-04 2.02e+00 4.80e+00
##
##
@@ -730,16 +728,16 @@
<div id="dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="section level1">
<h1 class="hasAnchor">
<a href="#dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="anchor"></a>DT50 not observed in the study and DFOP problems in PestDF</h1>
-<div class="sourceCode" id="cb88"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb88-1" title="1">p14 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p14"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb81"><html><body><pre class="r"><span class="no">p14</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p14"</span>]])</pre></body></html></div>
<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb94"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb94-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p14)</a></code></pre></div>
+<div class="sourceCode" id="cb87"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p14</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p14-1.png" width="700"></p>
-<div class="sourceCode" id="cb95"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb95-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p14)</a></code></pre></div>
+<div class="sourceCode" id="cb88"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p14</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 48.43249 28.67746 27.26248
@@ -765,7 +763,7 @@
## Estimate Pr(&gt;t) Lower Upper
## parent_0 1.00e+02 2.96e-28 99.40280 101.2768
## k1 9.53e-03 1.20e-01 0.00638 0.0143
-## k2 7.29e-12 5.00e-01 0.00000 Inf
+## k2 7.70e-12 5.00e-01 0.00000 Inf
## g 3.98e-01 2.19e-01 0.30481 0.4998
## sigma 1.17e+00 7.68e-06 0.77406 1.5610
##
@@ -774,7 +772,7 @@
## DT50 DT90 DT50_rep
## SFO 2.48e+02 8.25e+02 2.48e+02
## IORE 4.34e+02 2.22e+04 6.70e+03
-## DFOP 2.54e+10 2.46e+11 9.51e+10
+## DFOP 2.41e+10 2.33e+11 9.00e+10
##
## Representative half-life:
## [1] 6697.44</code></pre>
@@ -783,17 +781,16 @@
<div id="n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="section level1">
<h1 class="hasAnchor">
<a href="#n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="anchor"></a>N is less than 1 and DFOP fraction parameter is below zero</h1>
-<div class="sourceCode" id="cb97"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb97-1" title="1">p15a &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p15a"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb90"><html><body><pre class="r"><span class="no">p15a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15a"</span>]])</pre></body></html></div>
<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb104"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb104-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p15a)</a></code></pre></div>
+<div class="sourceCode" id="cb96"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15a</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p15a-1.png" width="700"></p>
-<div class="sourceCode" id="cb105"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb105-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p15a)</a></code></pre></div>
+<div class="sourceCode" id="cb97"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15a</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 245.5248 135.0132 245.5248
@@ -816,12 +813,12 @@
## sigma 3.105 1.78e-04 1.795 4.416
##
## $DFOP
-## Estimate Pr(&gt;t) Lower Upper
-## parent_0 97.96752 2.85e-13 94.21914 101.7159
-## k1 0.00952 6.80e-02 0.00277 0.0327
-## k2 0.00952 3.82e-06 0.00902 0.0100
-## g 0.17247 NaN NA NA
-## sigma 4.18778 2.50e-04 2.39747 5.9781
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.96752 NA 94.21914 101.7159
+## k1 0.00952 NA 0.00241 0.0377
+## k2 0.00952 NA 0.00747 0.0121
+## g 0.17247 NA NA NA
+## sigma 4.18778 NA 2.39747 5.9781
##
##
## DTx values:
@@ -832,16 +829,16 @@
##
## Representative half-life:
## [1] 41.33</code></pre>
-<div class="sourceCode" id="cb107"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb107-1" title="1">p15b &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p15b"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb99"><html><body><pre class="r"><span class="no">p15b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15b"</span>]])</pre></body></html></div>
<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre>
<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre>
-<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
-## result is doubtful</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
-<div class="sourceCode" id="cb113"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb113-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p15b)</a></code></pre></div>
+<div class="sourceCode" id="cb105"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15b</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p15b-1.png" width="700"></p>
-<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb114-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p15b)</a></code></pre></div>
+<div class="sourceCode" id="cb106"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15b</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 106.91629 68.55574 106.91629
@@ -858,18 +855,18 @@
##
## $IORE
## Estimate Pr(&gt;t) Lower Upper
-## parent_0 99.83 1.81e-16 97.51349 102.14
+## parent_0 99.83 1.81e-16 97.51348 102.14
## k__iore_parent_sink 0.38 3.22e-01 0.00352 41.05
-## N_parent 0.00 5.00e-01 -1.07695 1.08
+## N_parent 0.00 5.00e-01 -1.07696 1.08
## sigma 2.21 2.57e-04 1.23245 3.19
##
## $DFOP
## Estimate Pr(&gt;t) Lower Upper
-## parent_0 1.01e+02 NA 9.82e+01 1.04e+02
-## k1 4.86e-03 NA 6.75e-04 3.49e-02
-## k2 4.86e-03 NA 3.37e-03 6.99e-03
+## parent_0 1.01e+02 NA 98.24464 1.04e+02
+## k1 4.86e-03 NA 0.00068 3.47e-02
+## k2 4.86e-03 NA 0.00338 6.99e-03
## g 1.50e-01 NA NA NA
-## sigma 2.76e+00 NA 1.58e+00 3.94e+00
+## sigma 2.76e+00 NA 1.58208 3.94e+00
##
##
## DTx values:
@@ -885,14 +882,14 @@
<div id="the-dfop-fraction-parameter-is-greater-than-1" class="section level1">
<h1 class="hasAnchor">
<a href="#the-dfop-fraction-parameter-is-greater-than-1" class="anchor"></a>The DFOP fraction parameter is greater than 1</h1>
-<div class="sourceCode" id="cb116"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb116-1" title="1">p16 &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/nafta.html">nafta</a></span>(NAFTA_SOP_Attachment[[<span class="st">"p16"</span>]])</a></code></pre></div>
+<div class="sourceCode" id="cb108"><html><body><pre class="r"><span class="no">p16</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p16"</span>]])</pre></body></html></div>
<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
<pre><code>## The representative half-life of the IORE model is longer than the one corresponding</code></pre>
<pre><code>## to the terminal degradation rate found with the DFOP model.</code></pre>
<pre><code>## The representative half-life obtained from the DFOP model may be used</code></pre>
-<div class="sourceCode" id="cb121"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb121-1" title="1"><span class="kw"><a href="https://rdrr.io/r/graphics/plot.html">plot</a></span>(p16)</a></code></pre></div>
+<div class="sourceCode" id="cb113"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p16</span>)</pre></body></html></div>
<p><img src="NAFTA_examples_files/figure-html/p16-1.png" width="700"></p>
-<div class="sourceCode" id="cb122"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb122-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(p16)</a></code></pre></div>
+<div class="sourceCode" id="cb114"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p16</span>)</pre></body></html></div>
<pre><code>## Sums of squares:
## SFO IORE DFOP
## 3831.804 2062.008 1550.980
@@ -917,7 +914,7 @@
## $DFOP
## Estimate Pr(&gt;t) Lower Upper
## parent_0 88.5333 7.40e-18 79.9836 97.083
-## k1 18.5561 5.00e-01 0.0000 Inf
+## k1 18.5560 5.00e-01 0.0000 Inf
## k2 0.0776 1.41e-05 0.0518 0.116
## g 0.4733 1.41e-09 0.3674 0.582
## sigma 7.1902 2.11e-08 5.2785 9.102
@@ -950,53 +947,11 @@
</div>
</div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
- <div id="tocnav">
- <h2 class="hasAnchor">
-<a href="#tocnav" class="anchor"></a>Contents</h2>
- <ul class="nav nav-pills nav-stacked">
-<li><a href="#introduction">Introduction</a></li>
- <li>
-<a href="#examples-where-dfop-did-not-converge-with-pestdf-0-8-4">Examples where DFOP did not converge with PestDF 0.8.4</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#example-on-page-5-upper-panel">Example on page 5, upper panel</a></li>
- <li><a href="#example-on-page-5-lower-panel">Example on page 5, lower panel</a></li>
- <li><a href="#example-on-page-6">Example on page 6</a></li>
- <li><a href="#example-on-page-7">Example on page 7</a></li>
- </ul>
-</li>
- <li>
-<a href="#examples-where-the-representative-half-life-deviates-from-the-observed-dt50">Examples where the representative half-life deviates from the observed DT50</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#example-on-page-8">Example on page 8</a></li>
- </ul>
-</li>
- <li>
-<a href="#examples-where-sfo-was-not-selected-for-an-abiotic-study">Examples where SFO was not selected for an abiotic study</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#example-on-page-9-upper-panel">Example on page 9, upper panel</a></li>
- <li><a href="#example-on-page-9-lower-panel">Example on page 9, lower panel</a></li>
- <li><a href="#example-on-page-10">Example on page 10</a></li>
- </ul>
-</li>
- <li>
-<a href="#the-dt50-was-not-observed-during-the-study">The DT50 was not observed during the study</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#example-on-page-11">Example on page 11</a></li>
- </ul>
-</li>
- <li>
-<a href="#n-is-less-than-1-and-the-dfop-rate-constants-are-like-the-sfo-rate-constant">N is less than 1 and the DFOP rate constants are like the SFO rate constant</a><ul class="nav nav-pills nav-stacked">
-<li><a href="#example-on-page-12-upper-panel">Example on page 12, upper panel</a></li>
- <li><a href="#example-on-page-12-lower-panel">Example on page 12, lower panel</a></li>
- <li><a href="#example-on-page-13">Example on page 13</a></li>
- </ul>
-</li>
- <li><a href="#dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf">DT50 not observed in the study and DFOP problems in PestDF</a></li>
- <li><a href="#n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero">N is less than 1 and DFOP fraction parameter is below zero</a></li>
- <li><a href="#the-dfop-fraction-parameter-is-greater-than-1">The DFOP fraction parameter is greater than 1</a></li>
- <li><a href="#conclusions">Conclusions</a></li>
- <li><a href="#references">References</a></li>
- </ul>
+ <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
+ </nav>
</div>
- </div>
</div>
@@ -1007,7 +962,7 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png
index ef5e72ed..218a790f 100644
--- a/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png
+++ b/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png
Binary files differ
diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html
index ad7cf62c..b47df46f 100644
--- a/docs/articles/web_only/benchmarks.html
+++ b/docs/articles/web_only/benchmarks.html
@@ -5,13 +5,13 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>Benchmark timings for mkin on various systems • mkin</title>
+<title>Benchmark timings for mkin • mkin</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
-<script src="../../pkgdown.js"></script><meta property="og:title" content="Benchmark timings for mkin on various systems">
+<script src="../../pkgdown.js"></script><meta property="og:title" content="Benchmark timings for mkin">
<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -94,10 +94,10 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1 data-toc-skip>Benchmark timings for mkin on various systems</h1>
+ <h1 data-toc-skip>Benchmark timings for mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2020-05-11</h4>
+ <h4 class="date">2020-05-12</h4>
<small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/benchmarks.Rmd"><code>vignettes/web_only/benchmarks.Rmd</code></a></small>
<div class="hidden name"><code>benchmarks.Rmd</code></div>
@@ -106,51 +106,55 @@
-<div id="systems" class="section level2">
-<h2 class="hasAnchor">
-<a href="#systems" class="anchor"></a>Systems</h2>
-<p>Each system is characterized by its CPU type, the operating system type and the mkin version.</p>
+<p>Each system is characterized by its CPU type, the operating system type and the mkin version. Currently only values for one system are available.</p>
<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">cpu_model</span> <span class="kw">&lt;-</span> <span class="kw pkg">benchmarkme</span><span class="kw ns">::</span><span class="fu"><a href="https://rdrr.io/pkg/benchmarkme/man/get_cpu.html">get_cpu</a></span>()$<span class="no">model_name</span>
<span class="no">operating_system</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html">Sys.info</a></span>()<span class="kw">[[</span><span class="st">"sysname"</span>]]
<span class="no">mkin_version</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/character.html">as.character</a></span>(<span class="fu"><a href="https://rdrr.io/r/utils/packageDescription.html">packageVersion</a></span>(<span class="st">"mkin"</span>))
<span class="no">system_string</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="no">operating_system</span>, <span class="st">", "</span>, <span class="no">cpu_model</span>, <span class="st">", mkin version "</span>, <span class="no">mkin_version</span>)
<span class="fu"><a href="https://rdrr.io/r/base/load.html">load</a></span>(<span class="st">"~/git/mkin/vignettes/web_only/mkin_benchmarks.rda"</span>)
-<span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"CPU"</span>, <span class="st">"OS"</span>, <span class="st">"mkin"</span>)] <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">cpu_model</span>, <span class="no">operating_system</span>, <span class="no">mkin_version</span>)
+<span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"CPU"</span>, <span class="st">"OS"</span>, <span class="st">"mkin"</span>)] <span class="kw">&lt;-</span>
+ <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">cpu_model</span>, <span class="no">operating_system</span>, <span class="no">mkin_version</span>)
<span class="kw">if</span> (<span class="no">mkin_version</span> <span class="kw">&gt;</span> <span class="st">"0.9.48.1"</span>) {
- <span class="no">mmkin_bench</span> <span class="kw">&lt;-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="st">"const"</span>) <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">error_model</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+ <span class="no">mmkin_bench</span> <span class="kw">&lt;-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="st">"const"</span>) {
+ <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">error_model</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+ }
} <span class="kw">else</span> {
- <span class="no">mmkin_bench</span> <span class="kw">&lt;-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="kw">NULL</span>) <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">reweight.method</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+ <span class="no">mmkin_bench</span> <span class="kw">&lt;-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="kw">NULL</span>) {
+ <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">reweight.method</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+ }
}</pre></body></html></div>
+<div id="test-cases" class="section level2">
+<h2 class="hasAnchor">
+<a href="#test-cases" class="anchor"></a>Test cases</h2>
+<p>Parent only:</p>
<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">FOCUS_C</span> <span class="kw">&lt;-</span> <span class="no">FOCUS_2006_C</span>
<span class="no">FOCUS_D</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html">subset</a></span>(<span class="no">FOCUS_2006_D</span>, <span class="no">value</span> <span class="kw">!=</span> <span class="fl">0</span>)
-<span class="co"># Parent only</span>
-<span class="no">t1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
-<span class="no">t2</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
-<pre><code>## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge:
-## iteration limit reached without convergence (10)
+<span class="no">parent_datasets</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>)
-## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge:
-## iteration limit reached without convergence (10)</code></pre>
-<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="co"># One metabolite</span>
-<span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+<span class="no">t1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t2</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>,
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
+<p>One metabolite:</p>
+<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>),
<span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="no">FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
<span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="no">DFOP_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="no">DFOP_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
<span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
-<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="no">t3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
-<span class="no">t4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
-<span class="no">t5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
-
-<span class="co"># Two metabolites, synthetic data</span>
-<span class="no">m_synth_SFO_lin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>),
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="no">t3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
+<p>Two metabolites, synthetic data:</p>
+<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="no">m_synth_SFO_lin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>),
<span class="kw">M1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>),
<span class="kw">M2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
<span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
@@ -167,78 +171,63 @@
<span class="no">t6</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>)))[<span class="st">"elapsed"</span>]
<span class="no">t7</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>)))[<span class="st">"elapsed"</span>]
-<span class="no">t8</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>]
-<span class="no">t9</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>]
+<span class="no">t8</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>]
+<span class="no">t9</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>]
-<span class="no">t10</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>]
-<span class="no">t11</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>]
-
-<span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">1</span>:<span class="fl">11</span>)] <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">t1</span>, <span class="no">t2</span>, <span class="no">t3</span>, <span class="no">t4</span>, <span class="no">t5</span>, <span class="no">t6</span>, <span class="no">t7</span>, <span class="no">t8</span>, <span class="no">t9</span>, <span class="no">t10</span>, <span class="no">t11</span>)
-<span class="no">mkin_benchmarks</span>[, -<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">1</span>:<span class="fl">3</span>)]</pre></body></html></div>
-<pre><code>## t1
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 3.610
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.184
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.064
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.296
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.936
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 1.683
-## t2
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 11.019
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 22.889
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 12.558
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 21.239
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 20.545
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 3.862
-## t3
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 3.764
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.649
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.786
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.510
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.446
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 1.369
-## t4
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 14.347
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 13.789
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 8.461
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 13.805
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 15.335
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 6.104
-## t5 t6
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 9.495 2.623
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 6.395 2.542
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.675 2.723
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.386 2.643
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 6.002 2.635
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 2.718 0.752
-## t7 t8
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 4.587 7.525
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.128 4.632
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.478 4.862
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.374 7.02
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.259 4.737
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 1.214 1.276
-## t9
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 16.621
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.171
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.618
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 11.124
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 7.763
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 2.858
-## t10
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 8.576
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 3.676
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 3.579
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 5.388
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 3.427
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 2.032
-## t11
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 31.267
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 5.636
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.574
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.365
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.626
-## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50 2.973</code></pre>
-<div class="sourceCode" id="cb12"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/save.html">save</a></span>(<span class="no">mkin_benchmarks</span>, <span class="kw">file</span> <span class="kw">=</span> <span class="st">"~/git/mkin/vignettes/mkin_benchmarks.rda"</span>)</pre></body></html></div>
+<span class="no">t10</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>]
+<span class="no">t11</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>]</pre></body></html></div>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">1</span>:<span class="fl">11</span>)] <span class="kw">&lt;-</span>
+ <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">t1</span>, <span class="no">t2</span>, <span class="no">t3</span>, <span class="no">t4</span>, <span class="no">t5</span>, <span class="no">t6</span>, <span class="no">t7</span>, <span class="no">t8</span>, <span class="no">t9</span>, <span class="no">t10</span>, <span class="no">t11</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/save.html">save</a></span>(<span class="no">mkin_benchmarks</span>, <span class="kw">file</span> <span class="kw">=</span> <span class="st">"~/git/mkin/vignettes/web_only/mkin_benchmarks.rda"</span>)</pre></body></html></div>
+</div>
+<div id="results" class="section level2">
+<h2 class="hasAnchor">
+<a href="#results" class="anchor"></a>Results</h2>
+<p>Currently, we only have benchmark information on one system, therefore only the mkin version is shown with the results below. Timings are in seconds, shorter is better.</p>
+<p>Benchmarks for all available error models are shown.</p>
+<div id="parent-only" class="section level3">
+<h3 class="hasAnchor">
+<a href="#parent-only" class="anchor"></a>Parent only</h3>
+<p>Constant variance and two-component error model:</p>
+<div class="sourceCode" id="cb12"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">mkin_benchmarks</span>[, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"mkin"</span>, <span class="st">"t1"</span>, <span class="st">"t2"</span>)], <span class="kw">row.names</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin t1 t2
+## 0.9.48.1 3.610 11.019
+## 0.9.49.1 8.184 22.889
+## 0.9.49.2 7.064 12.558
+## 0.9.49.3 7.296 21.239
+## 0.9.49.4 5.936 20.545
+## 0.9.50.2 1.697 3.895</code></pre>
+</div>
+<div id="one-metabolite" class="section level3">
+<h3 class="hasAnchor">
+<a href="#one-metabolite" class="anchor"></a>One metabolite</h3>
+<p>Constant variance, variance by variable and two-component error model:</p>
+<div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">mkin_benchmarks</span>[, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"mkin"</span>, <span class="st">"t3"</span>, <span class="st">"t4"</span>, <span class="st">"t5"</span>)], <span class="kw">row.names</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin t3 t4 t5
+## 0.9.48.1 3.764 14.347 9.495
+## 0.9.49.1 4.649 13.789 6.395
+## 0.9.49.2 4.786 8.461 5.675
+## 0.9.49.3 4.510 13.805 7.386
+## 0.9.49.4 4.446 15.335 6.002
+## 0.9.50.2 1.365 6.105 2.727</code></pre>
+</div>
+<div id="two-metabolites" class="section level3">
+<h3 class="hasAnchor">
+<a href="#two-metabolites" class="anchor"></a>Two metabolites</h3>
+<p>Two different datasets, for each constant variance, variance by variable and two-component error model are shown:</p>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">mkin_benchmarks</span>[, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"mkin"</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">6</span>:<span class="fl">11</span>))], <span class="kw">row.names</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin t6 t7 t8 t9 t10 t11
+## 0.9.48.1 2.623 4.587 7.525 16.621 8.576 31.267
+## 0.9.49.1 2.542 4.128 4.632 8.171 3.676 5.636
+## 0.9.49.2 2.723 4.478 4.862 7.618 3.579 5.574
+## 0.9.49.3 2.643 4.374 7.02 11.124 5.388 7.365
+## 0.9.49.4 2.635 4.259 4.737 7.763 3.427 5.626
+## 0.9.50.2 0.752 1.218 1.273 2.851 2.038 2.968</code></pre>
+</div>
</div>
</div>
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html
index 0e58496e..85134720 100644
--- a/docs/articles/web_only/compiled_models.html
+++ b/docs/articles/web_only/compiled_models.html
@@ -6,19 +6,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Performance benefit by using compiled model definitions in mkin • mkin</title>
-<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
-<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
-<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
+<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
<script src="../../pkgdown.js"></script><meta property="og:title" content="Performance benefit by using compiled model definitions in mkin">
-<meta property="og:description" content="">
-<meta name="twitter:card" content="summary">
+<meta property="og:description" content="mkin">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
-<body>
+<body data-spy="scroll" data-target="#toc">
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.9</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
</span>
</div>
@@ -74,7 +74,14 @@
<a href="../../news/index.html">News</a>
</li>
</ul>
-<ul class="nav navbar-nav navbar-right"></ul>
+<ul class="nav navbar-nav navbar-right">
+<li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
</div>
<!--/.nav-collapse -->
</div>
@@ -87,12 +94,12 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
- <h1>Performance benefit by using compiled model definitions in mkin</h1>
+ <h1 data-toc-skip>Performance benefit by using compiled model definitions in mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2020-04-04</h4>
-
+ <h4 class="date">2020-05-12</h4>
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/compiled_models.Rmd"><code>vignettes/web_only/compiled_models.Rmd</code></a></small>
<div class="hidden name"><code>compiled_models.Rmd</code></div>
</div>
@@ -103,99 +110,90 @@
<h2 class="hasAnchor">
<a href="#how-to-benefit-from-compiled-models" class="anchor"></a>How to benefit from compiled models</h2>
<p>When using an mkin version equal to or greater than 0.9-36 and a C compiler is available, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. Starting from version 0.9.49.9, the <code><a href="../../reference/mkinmod.html">mkinmod()</a></code> function checks for presence of a compiler using</p>
-<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">pkgbuild<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/pkgbuild/man/has_compiler.html">has_compiler</a></span>()</a></code></pre></div>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="kw pkg">pkgbuild</span><span class="kw ns">::</span><span class="fu"><a href="https://rdrr.io/pkg/pkgbuild/man/has_compiler.html">has_compiler</a></span>()</pre></body></html></div>
<p>In previous versions, it used <code><a href="https://rdrr.io/r/base/Sys.which.html">Sys.which("gcc")</a></code> for this check.</p>
<p>On Linux, you need to have the essential build tools like make and gcc or clang installed. On Debian based linux distributions, these will be pulled in by installing the build-essential package.</p>
<p>On MacOS, which I do not use personally, I have had reports that a compiler is available by default.</p>
<p>On Windows, you need to install Rtools and have the path to its bin directory in your PATH variable. You do not need to modify the PATH variable when installing Rtools. Instead, I would recommend to put the line</p>
-<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/Sys.setenv.html">Sys.setenv</a></span>(<span class="dt">PATH =</span> <span class="kw"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(<span class="st">"C:/Rtools/bin"</span>, <span class="kw"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"PATH"</span>), <span class="dt">sep=</span><span class="st">";"</span>))</a></code></pre></div>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/Sys.setenv.html">Sys.setenv</a></span>(<span class="kw">PATH</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(<span class="st">"C:/Rtools/bin"</span>, <span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"PATH"</span>), <span class="kw">sep</span><span class="kw">=</span><span class="st">";"</span>))</pre></body></html></div>
<p>into your .Rprofile startup file. This is just a text file with some R code that is executed when your R session starts. It has to be named .Rprofile and has to be located in your home directory, which will generally be your Documents folder. You can check the location of the home directory used by R by issuing</p>
-<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"HOME"</span>)</a></code></pre></div>
+<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"HOME"</span>)</pre></body></html></div>
</div>
-<div id="comparison-with-eigenvalue-based-solutions" class="section level2">
+<div id="comparison-with-other-solution-methods" class="section level2">
<h2 class="hasAnchor">
-<a href="#comparison-with-eigenvalue-based-solutions" class="anchor"></a>Comparison with Eigenvalue based solutions</h2>
-<p>First, we build a simple degradation model for a parent compound with one metabolite.</p>
-<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
-<a class="sourceLine" id="cb4-2" title="2">SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../../reference/mkinmod.html">mkinmod</a></span>(</a>
-<a class="sourceLine" id="cb4-3" title="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="cb4-4" title="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>
+<a href="#comparison-with-other-solution-methods" class="anchor"></a>Comparison with other solution methods</h2>
+<p>First, we build a simple degradation model for a parent compound with one metabolite, and we remove zero values from the dataset.</p>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></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. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed.</p>
-<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="cf">if</span> (<span class="kw"><a href="https://rdrr.io/r/base/library.html">require</a></span>(rbenchmark)) {</a>
-<a class="sourceLine" id="cb6-2" title="2"> b<span class="fl">.1</span> &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(</a>
-<a class="sourceLine" id="cb6-3" title="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="cb6-4" title="4"> <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>,</a>
-<a class="sourceLine" id="cb6-5" title="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="cb6-6" title="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="cb6-7" title="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="cb6-8" title="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="cb6-9" title="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="cb6-10" title="10"> <span class="dt">replications =</span> <span class="dv">3</span>)</a>
-<a class="sourceLine" id="cb6-11" title="11"> <span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(b<span class="fl">.1</span>)</a>
-<a class="sourceLine" id="cb6-12" title="12"> factor_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(b<span class="fl">.1</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])</a>
-<a class="sourceLine" id="cb6-13" title="13">} <span class="cf">else</span> {</a>
-<a class="sourceLine" id="cb6-14" title="14"> factor_SFO_SFO &lt;-<span class="st"> </span><span class="ot">NA</span></a>
-<a class="sourceLine" id="cb6-15" title="15"> <span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package rbenchmark is not available"</span>)</a>
-<a class="sourceLine" id="cb6-16" title="16">}</a></code></pre></div>
-<pre><code>## test replications elapsed relative user.self sys.self
-## 3 deSolve, compiled 3 3.107 1.000 3.105 0
-## 1 deSolve, not compiled 3 28.765 9.258 28.749 0
-## 2 Eigenvalue based 3 4.446 1.431 4.445 0
-## user.child sys.child
-## 3 0 0
-## 1 0 0
-## 2 0 0</code></pre>
-<p>We see that using the compiled model is by a factor of around 9 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.</p>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">FOCUS_D</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html">subset</a></span>(<span class="no">FOCUS_2006_D</span>, <span class="no">value</span> <span class="kw">!=</span> <span class="fl">0</span>)</pre></body></html></div>
+<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. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed. Since mkin version 0.9.49.11, an analytical solution is also implemented, which is included in the tests below.</p>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) {
+ <span class="no">b.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(
+ <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"Eigenvalue based"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"eigen"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"analytical"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"analytical"</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>,
+ <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>))
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.1</span>)
+} <span class="kw">else</span> {
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package rbenchmark is not available"</span>)
+}</pre></body></html></div>
+<pre><code>## test replications relative elapsed
+## 4 analytical 1 1.000 0.190
+## 3 deSolve, compiled 1 1.774 0.337
+## 2 Eigenvalue based 1 2.105 0.400
+## 1 deSolve, not compiled 1 42.763 8.125</code></pre>
+<p>We see that using the compiled model is by more than a factor of 10 faster than using deSolve without compiled code.</p>
</div>
-<div id="model-that-can-not-be-solved-with-eigenvalues" class="section level2">
+<div id="model-without-analytical-solution" class="section level2">
<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" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="cf">if</span> (<span class="kw"><a href="https://rdrr.io/r/base/library.html">require</a></span>(rbenchmark)) {</a>
-<a class="sourceLine" id="cb8-2" title="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" title="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" title="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" title="5"></a>
-<a class="sourceLine" id="cb8-6" title="6"> b<span class="fl">.2</span> &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(</a>
-<a class="sourceLine" id="cb8-7" title="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" title="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" title="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" title="10"> <span class="dt">replications =</span> <span class="dv">3</span>)</a>
-<a class="sourceLine" id="cb8-11" title="11"> <span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(b<span class="fl">.2</span>)</a>
-<a class="sourceLine" id="cb8-12" title="12"> factor_FOMC_SFO &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(b<span class="fl">.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])</a>
-<a class="sourceLine" id="cb8-13" title="13">} <span class="cf">else</span> {</a>
-<a class="sourceLine" id="cb8-14" title="14"> factor_FOMC_SFO &lt;-<span class="st"> </span><span class="ot">NA</span></a>
-<a class="sourceLine" id="cb8-15" title="15"> <span class="kw"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package benchmark is not available"</span>)</a>
-<a class="sourceLine" id="cb8-16" title="16">}</a></code></pre></div>
+<a href="#model-without-analytical-solution" class="anchor"></a>Model without analytical solution</h2>
+<p>This evaluation is also taken from the example section of mkinfit. No analytical solution is available for this system, and now Eigenvalue based solution is possible, so only deSolve using with or without compiled code is available.</p>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) {
+ <span class="no">FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>))
+
+ <span class="no">b.2</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(
+ <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>,
+ <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>))
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.2</span>)
+ <span class="no">factor_FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(<span class="no">b.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])
+} <span class="kw">else</span> {
+ <span class="no">factor_FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fl">NA</span>
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package benchmark is not available"</span>)
+}</pre></body></html></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 4.844 1.000 4.842 0
-## 1 deSolve, not compiled 3 53.833 11.113 53.807 0
-## user.child sys.child
-## 2 0 0
-## 1 0 0</code></pre>
-<p>Here we get a performance benefit of a factor of 11 using the version of the differential equation model compiled from C code!</p>
-<p>This vignette was built with mkin 0.9.49.9 on</p>
-<pre><code>## R version 3.6.3 (2020-02-29)
+<pre><code>## test replications relative elapsed
+## 2 deSolve, compiled 1 1.000 0.476
+## 1 deSolve, not compiled 1 30.103 14.329</code></pre>
+<p>Here we get a performance benefit of a factor of 30 using the version of the differential equation model compiled from C code!</p>
+<p>This vignette was built with mkin 0.9.50.2 on</p>
+<pre><code>## R version 4.0.0 (2020-04-24)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Debian GNU/Linux 10 (buster)</code></pre>
<pre><code>## CPU model: AMD Ryzen 7 1700 Eight-Core Processor</code></pre>
</div>
</div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
- <div id="tocnav">
- <h2 class="hasAnchor">
-<a href="#tocnav" class="anchor"></a>Contents</h2>
- <ul class="nav nav-pills nav-stacked">
-<li><a href="#how-to-benefit-from-compiled-models">How to benefit from compiled models</a></li>
- <li><a href="#comparison-with-eigenvalue-based-solutions">Comparison with Eigenvalue based solutions</a></li>
- <li><a href="#model-that-can-not-be-solved-with-eigenvalues">Model that can not be solved with Eigenvalues</a></li>
- </ul>
+ <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
+ </nav>
</div>
- </div>
</div>
@@ -206,7 +204,7 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>

Contact - Imprint