<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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>Example evaluation of FOCUS dataset Z • mkin</title>
<!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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>
<div class="container template-vignette">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">mkin</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../reference/index.html">Functions and data</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/mkin.html">Introduction to mkin</a>
</li>
<li>
<a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
</li>
<li>
<a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
</li>
<li>
<a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
</li>
<li>
<a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
</li>
<li>
<a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
</li>
</ul>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9">
<div class="page-header toc-ignore">
<h1>Example evaluation of FOCUS dataset Z</h1>
<h4 class="author">Johannes Ranke</h4>
<h4 class="date">2018-01-14</h4>
</div>
<div class="contents">
<p><a href="http://www.jrwb.de">Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany</a><br><a href="http://chem.uft.uni-bremen.de/ranke">Privatdozent at the University of Bremen</a></p>
<div id="the-data" class="section level1">
<h1 class="hasAnchor">
<a href="#the-data" class="anchor"></a>The data</h1>
<p>The following code defines the example dataset from Appendix 7 to the FOCUS kinetics report <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014, 354)</span>.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(mkin, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)
LOD =<span class="st"> </span><span class="fl">0.5</span>
FOCUS_2006_Z =<span class="st"> </span><span class="kw">data.frame</span>(
<span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">0.04</span>, <span class="fl">0.125</span>, <span class="fl">0.29</span>, <span class="fl">0.54</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">10</span>, <span class="dv">14</span>, <span class="dv">21</span>,
<span class="dv">42</span>, <span class="dv">61</span>, <span class="dv">96</span>, <span class="dv">124</span>),
<span class="dt">Z0 =</span> <span class="kw">c</span>(<span class="dv">100</span>, <span class="fl">81.7</span>, <span class="fl">70.4</span>, <span class="fl">51.1</span>, <span class="fl">41.2</span>, <span class="fl">6.6</span>, <span class="fl">4.6</span>, <span class="fl">3.9</span>, <span class="fl">4.6</span>, <span class="fl">4.3</span>, <span class="fl">6.8</span>,
<span class="fl">2.9</span>, <span class="fl">3.5</span>, <span class="fl">5.3</span>, <span class="fl">4.4</span>, <span class="fl">1.2</span>, <span class="fl">0.7</span>),
<span class="dt">Z1 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">18.3</span>, <span class="fl">29.6</span>, <span class="fl">46.3</span>, <span class="fl">55.1</span>, <span class="fl">65.7</span>, <span class="fl">39.1</span>, <span class="dv">36</span>, <span class="fl">15.3</span>, <span class="fl">5.6</span>, <span class="fl">1.1</span>,
<span class="fl">1.6</span>, <span class="fl">0.6</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),
<span class="dt">Z2 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <span class="fl">2.6</span>, <span class="fl">3.8</span>, <span class="fl">15.3</span>, <span class="fl">37.2</span>, <span class="fl">31.7</span>, <span class="fl">35.6</span>, <span class="fl">14.5</span>,
<span class="fl">0.8</span>, <span class="fl">2.1</span>, <span class="fl">1.9</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>),
<span class="dt">Z3 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <span class="fl">9.2</span>, <span class="fl">13.1</span>, <span class="fl">22.3</span>, <span class="fl">28.4</span>, <span class="fl">32.5</span>,
<span class="fl">25.2</span>, <span class="fl">17.2</span>, <span class="fl">4.8</span>, <span class="fl">4.5</span>, <span class="fl">2.8</span>, <span class="fl">4.4</span>))
FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_Z)</code></pre></div>
</div>
<div id="parent-and-one-metabolite" class="section level1">
<h1 class="hasAnchor">
<a href="#parent-and-one-metabolite" class="anchor"></a>Parent and one metabolite</h1>
<p>The next step is to set up the models used for the kinetic analysis. As the simultaneous fit of parent and the first metabolite is usually straightforward, Step 1 (SFO for parent only) is skipped here. We start with the model 2a, with formation and decline of metabolite Z1 and the pathway from parent directly to sink included (default in mkin).</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.2a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.2a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.2a, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.2a)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png" width="672"></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.2a, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(>t) Lower
## Z0_0 9.701488e+01 3.55313531 2.730402e+01 1.679194e-21 91.4013833
## k_Z0_sink 6.213452e-10 0.22689429 2.738479e-09 5.000000e-01 0.0000000
## k_Z0_Z1 2.236006e+00 0.16507349 1.354552e+01 7.393893e-14 1.8374087
## k_Z1_sink 4.821248e-01 0.06585366 7.321154e+00 3.551981e-08 0.4005976
## Upper
## Z0_0 102.6283792
## k_Z0_sink Inf
## k_Z0_Z1 2.7210739
## k_Z1_sink 0.5802439</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 negligible. Accordingly, the exact magnitude of the fitted parameter is ill-defined and the covariance matrix is not returned (not shown, would be visible in the complete summary). This suggests, in agreement with the analysis in the FOCUS kinetics report, to simplify the model by removing the pathway to sink.</p>
<p>A similar result can be obtained when formation fractions are used in the model formulation:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.2a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
<span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.2a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.2a.ff, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.2a.ff)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png" width="672"></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.2a.ff, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper
## Z0_0 97.0148813 3.55314638 27.303936 1.679331e-21 NA NA
## k_Z0 2.2360064 0.21684717 10.311439 3.661734e-11 NA NA
## k_Z1 0.4821248 0.06585372 7.321147 3.552046e-08 NA NA
## f_Z0_to_Z1 1.0000000 0.10147344 9.854795 9.707117e-11 NA NA</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. Again, the covariance matrix is not returned as the model is overparameterised.</p>
<p>The simplified model is obtained by setting the list component to .</p>
<p>In the following, we use the parameterisation with formation fractions in order to be able to compare with the results in the FOCUS guidance, and as it makes it easier to use parameters obtained in a previous fit when adding a further metabolite.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.3</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.3</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png" width="672"></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.3</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper
## Z0_0 97.0148816 2.68177104 36.17568 2.363590e-25 91.5215232 102.5082401
## k_Z0 2.2360064 0.14686238 15.22518 2.247007e-15 1.9545318 2.5580166
## k_Z1 0.4821248 0.04268711 11.29439 3.068559e-12 0.4021552 0.5779966</code></pre>
<p>As there is only one transformation product for Z0 and no pathway to sink, the formation fraction is internally fixed to unity.</p>
</div>
<div id="metabolites-z2-and-z3" class="section level1">
<h1 class="hasAnchor">
<a href="#metabolites-z2-and-z3" class="anchor"></a>Metabolites Z2 and Z3</h1>
<p>As suggested in the FOCUS report, the pathway to sink was removed for metabolite Z1 as well in the next step. While this step appears questionable on the basis of the above results, it is followed here for the purpose of comparison. Also, in the FOCUS report, it is assumed that there is additional empirical evidence that Z1 quickly and exclusively hydrolyses to Z2.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.5</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.5</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png" width="672"></p>
<p>Finally, metabolite Z3 is added to the model. We use the optimised differential equation parameter values from the previous fit in order to accelerate the optimization.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.FOCUS <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
<span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
<span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.FOCUS <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.FOCUS, FOCUS_2006_Z_mkin,
<span class="dt">parms.ini =</span> m.Z<span class="fl">.5</span>$bparms.ode,
<span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div>
<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation by method Port did not converge.
## Convergence code is 1</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.FOCUS)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="672"></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div>
<pre><code>## Estimate se_notrans t value Pr(>t) Lower
## Z0_0 96.84024413 2.05881366 47.036916 5.572278e-44 92.70685169
## k_Z0 2.21540096 0.11812759 18.754306 7.736886e-25 1.99050408
## k_Z1 0.47835870 0.02929353 16.329843 3.344317e-22 0.42303496
## k_Z2 0.45166296 0.04418624 10.221801 3.036447e-14 0.37106537
## k_Z3 0.05868971 0.01428961 4.107158 7.256030e-05 0.03598292
## f_Z2_to_Z3 0.47147387 0.05702672 8.267596 2.779011e-11 0.36029541
## Upper
## Z0_0 100.97363656
## k_Z0 2.46570780
## k_Z1 0.54091758
## k_Z2 0.54976682
## k_Z3 0.09572548
## f_Z2_to_Z3 0.58555627</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.FOCUS)</code></pre></div>
<pre><code>## $ff
## Z2_Z3 Z2_sink
## 0.4714739 0.5285261
##
## $SFORB
## logical(0)
##
## $distimes
## DT50 DT90
## Z0 0.3128766 1.039354
## Z1 1.4490113 4.813512
## Z2 1.5346558 5.098016
## Z3 11.8103701 39.233200</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">
<h1 class="hasAnchor">
<a href="#using-the-sforb-model" class="anchor"></a>Using the SFORB model</h1>
<p>As the FOCUS report states, there is a certain tailing of the time course of metabolite Z3. Also, the time course of the parent compound is not fitted very well using the SFO model, as residues at a certain low level remain.</p>
<p>Therefore, an additional model is offered here, using the single first-order reversible binding (SFORB) model for metabolite Z3. As expected, the <span class="math inline">\(\chi^2\)</span> error level is lower for metabolite Z3 using this model and the graphical fit for Z3 is improved. However, the covariance matrix is not returned.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.1</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
<span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.1</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.1</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.1</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png" width="672"></p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.mkin<span class="fl">.1</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)$cov.unscaled</code></pre></div>
<pre><code>## NULL</code></pre>
<p>Therefore, a further stepwise model building is performed starting from the stage of parent and two metabolites, starting from the assumption that the model fit for the parent compound can be improved by using the SFORB model.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.3</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.3</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png" width="672"></p>
<p>This results in a much better representation of the behaviour of the parent compound Z0.</p>
<p>Finally, Z3 is added as well. These models appear overparameterised (no covariance matrix returned) if the sink for Z1 is left in the models.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.4</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
<span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.4</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.4</span>, FOCUS_2006_Z_mkin,
<span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.3</span>$bparms.ode,
<span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.4</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png" width="672"></p>
<p>The error level of the fit, but especially of metabolite Z3, can be improved if the SFORB model is chosen for this metabolite, as this model is capable of representing the tailing of the metabolite decline phase.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>),
<span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
<span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div>
<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_2006_Z_mkin,
<span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.4</span>$bparms.ode[<span class="dv">1</span>:<span class="dv">4</span>],
<span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png" width="672"></p>
<p>The summary view of the backtransformed parameters shows that we get no confidence intervals due to overparameterisation. As the optimized is excessively small, it seems reasonable to fix it to zero.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin.5a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_2006_Z_mkin,
<span class="dt">parms.ini =</span> <span class="kw">c</span>(m.Z.mkin<span class="fl">.5</span>$bparms.ode[<span class="dv">1</span>:<span class="dv">7</span>],
<span class="dt">k_Z3_bound_free =</span> <span class="dv">0</span>),
<span class="dt">fixed_parms =</span> <span class="st">"k_Z3_bound_free"</span>,
<span class="dt">quiet =</span> <span class="ot">TRUE</span>)
<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin.5a)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png" width="672"></p>
<p>As expected, the residual plots for Z0 and Z3 are more random than in the case of the all SFO model for which they were shown above. In conclusion, the model is proposed as the best-fit model for the dataset from Appendix 7 of the FOCUS report.</p>
<p>A graphical representation of the confidence intervals can finally be obtained.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(m.Z.mkin.5a)</code></pre></div>
<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png" width="672"></p>
<p>The endpoints obtained with this model are</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.mkin.5a)</code></pre></div>
<pre><code>## $ff
## Z0_free_Z1 Z1_Z2 Z2_sink Z2_Z3_free Z3_free_sink
## 1.0000000 1.0000000 0.4634423 0.5365577 1.0000000
##
## $SFORB
## Z0_b1 Z0_b2 Z3_b1 Z3_b2
## 2.447137325 0.007512576 0.080007563 0.000000000
##
## $distimes
## DT50 DT90 DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2
## Z0 0.3042974 1.184810 0.2832482 92.26492 NA NA
## Z1 1.5147780 5.031984 NA NA NA NA
## Z2 1.6413852 5.452564 NA NA NA NA
## Z3 NA NA NA NA 8.663521 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">
<h1 class="hasAnchor">
<a href="#references" class="anchor"></a>References</h1>
<!-- vim: set foldmethod=syntax: -->
<div id="refs" class="references">
<div id="ref-FOCUSkinetics2014">
<p>FOCUS Work Group on Degradation Kinetics. 2014. <em>Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration</em>. 1.1 ed. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2>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>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Johannes Ranke.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>