aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/articles/mkin.html
blob: fa3ac11cb341951a8b18ff286ec0b827db9fdc4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<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>Introduction to 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="Introduction to mkin">
<meta property="og:description" content="mkin">
<meta name="robots" content="noindex">
<!-- 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 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">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">mkin</a>
        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" 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 class="divider">
    </li>
<li class="dropdown-header">Example evaluations with (generalised) nonlinear least squares</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/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Example evaluations with hierarchical models (nonlinear mixed-effects models)</li>
    <li>
      <a href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a>
    </li>
    <li>
      <a href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a>
    </li>
    <li>
      <a href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a>
    </li>
    <li>
      <a href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a>
    </li>
    <li>
      <a href="../articles/web_only/multistart.html">Short demo of the multistart method</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Performance</li>
    <li>
      <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
    </li>
    <li>
      <a href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a>
    </li>
    <li>
      <a href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Miscellaneous</li>
    <li>
      <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
    </li>
    <li>
      <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
      </ul>
<ul class="nav navbar-nav navbar-right">
<li>
  <a href="https://github.com/jranke/mkin/" class="external-link">
    <span class="fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
</div>
<!--/.nav-collapse -->
  </div>
<!--/.container -->
</div>
<!--/.navbar -->

      

      </header><div class="row">
  <div class="col-md-9 contents">
    <div class="page-header toc-ignore">
      <h1 data-toc-skip>Introduction to mkin</h1>
                        <h4 data-toc-skip class="author">Johannes
Ranke</h4>
            
            <h4 data-toc-skip class="date">Last change 15 February 2021
(rebuilt 2023-04-16)</h4>
      
      <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/mkin.rmd" class="external-link"><code>vignettes/mkin.rmd</code></a></small>
      <div class="hidden name"><code>mkin.rmd</code></div>

    </div>

    
    
<p><a href="https://www.jrwb.de" class="external-link">Wissenschaftlicher Berater, Kronacher
Str. 12, 79639 Grenzach-Wyhlen, Germany</a><br> Privatdozent at the
University of Freiburg</p>
<div class="section level2">
<h2 id="abstract">Abstract<a class="anchor" aria-label="anchor" href="#abstract"></a>
</h2>
<p>In the regulatory evaluation of chemical substances like plant
protection products (pesticides), biocides and other chemicals,
degradation data play an important role. For the evaluation of pesticide
degradation experiments, detailed guidance has been developed, based on
nonlinear optimisation. The <code>R</code> add-on package
<code>mkin</code> implements fitting some of the models recommended in
this guidance from within R and calculates some statistical measures for
data series within one or more compartments, for parent and
metabolites.</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="st"><a href="https://pkgdown.jrwb.de/mkin/">"mkin"</a></span>, quietly <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span><span class="co"># Define the kinetic model</span></span>
<span><span class="va">m_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M1"</span><span class="op">)</span>,</span>
<span>                         M1 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span>
<span>                         M2 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
<span>                         use_of_ff <span class="op">=</span> <span class="st">"max"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span></span>
<span></span>
<span><span class="co"># Produce model predictions using some arbitrary parameters</span></span>
<span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</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="fl">60</span>, <span class="fl">90</span>, <span class="fl">120</span><span class="op">)</span></span>
<span><span class="va">d_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>,</span>
<span>  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.03</span>,</span>
<span>    f_parent_to_M1 <span class="op">=</span> <span class="fl">0.5</span>, k_M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">100</span>,</span>
<span>    f_M1_to_M2 <span class="op">=</span> <span class="fl">0.9</span>, k_M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">50</span><span class="op">)</span>,</span>
<span>  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span>, M1 <span class="op">=</span> <span class="fl">0</span>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span>
<span>  <span class="va">sampling_times</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Generate a dataset by adding normally distributed errors with</span></span>
<span><span class="co"># standard deviation 3, for two replicates at each sampling time</span></span>
<span><span class="va">d_SFO_SFO_SFO_err</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/add_err.html">add_err</a></span><span class="op">(</span><span class="va">d_SFO_SFO_SFO</span>, reps <span class="op">=</span> <span class="fl">2</span>,</span>
<span>                             sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fl">3</span>,</span>
<span>                             n <span class="op">=</span> <span class="fl">1</span>, seed <span class="op">=</span> <span class="fl">123456789</span> <span class="op">)</span></span>
<span></span>
<span><span class="co"># Fit the model to the dataset</span></span>
<span><span class="va">f_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>, <span class="va">d_SFO_SFO_SFO_err</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Plot the results separately for parent and metabolites</span></span>
<span><span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">f_SFO_SFO_SFO</span>, lpos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
</div>
<div class="section level2">
<h2 id="background">Background<a class="anchor" aria-label="anchor" href="#background"></a>
</h2>
<p>The <code>mkin</code> package <span class="citation">(J. Ranke
2021)</span> implements the approach to degradation kinetics recommended
in the kinetics report provided by the FOrum for Co-ordination of
pesticide fate models and their USe <span class="citation">(FOCUS Work
Group on Degradation Kinetics 2006, 2014)</span>. It covers data series
describing the decline of one compound, data series with transformation
products (commonly termed metabolites) and data series for more than one
compartment. It is possible to include back reactions. Therefore,
equilibrium reactions and equilibrium partitioning can be specified,
although this often leads to an overparameterisation of the model.</p>
<p>When the first <code>mkin</code> code was published in 2010, the most
commonly used tools for fitting more complex kinetic degradation models
to experimental data were KinGUI <span class="citation">(Schäfer et al.
2007)</span>, a MATLAB based tool with a graphical user interface that
was specifically tailored to the task and included some output as
proposed by the FOCUS Kinetics Workgroup, and ModelMaker, a general
purpose compartment based tool providing infrastructure for fitting
dynamic simulation models based on differential equations to data.</p>
<p>The ‘mkin’ code was first uploaded to the BerliOS development
platform. When this was taken down, the version control history was
imported into the R-Forge site (see <em>e.g.</em> <a href="https://cgit.jrwb.de/mkin/commit/?id=30cbb4092f6d2d3beff5800603374a0d009ad770" class="external-link">the
initial commit on 11 May 2010</a>), where the code is still being
updated.</p>
<p>At that time, the R package <code>FME</code> (Flexible Modelling
Environment) <span class="citation">(Soetaert and Petzoldt 2010)</span>
was already available, and provided a good basis for developing a
package specifically tailored to the task. The remaining challenge was
to make it as easy as possible for the users (including the author of
this vignette) to specify the system of differential equations and to
include the output requested by the FOCUS guidance, such as the <span class="math inline">\(\chi^2\)</span> error level as defined in this
guidance.</p>
<p>Also, <code>mkin</code> introduced using analytical solutions for
parent only kinetics for improved optimization speed. Later, Eigenvalue
based solutions were introduced to <code>mkin</code> for the case of
linear differential equations (<em>i.e.</em> where the FOMC or DFOP
models were not used for the parent compound), greatly improving the
optimization speed for these cases. This, has become somehow obsolete,
as the use of compiled code described below gives even faster execution
times.</p>
<p>The possibility to specify back-reactions and a biphasic model
(SFORB) for metabolites were present in <code>mkin</code> from the very
beginning.</p>
<div class="section level3">
<h3 id="derived-software-tools">Derived software tools<a class="anchor" aria-label="anchor" href="#derived-software-tools"></a>
</h3>
<p>Soon after the publication of <code>mkin</code>, two derived tools
were published, namely KinGUII (developed at Bayer Crop Science) and
CAKE (commissioned to Tessella by Syngenta), which added a graphical
user interface (GUI), and added fitting by iteratively reweighted least
squares (IRLS) and characterisation of likely parameter distributions by
Markov Chain Monte Carlo (MCMC) sampling.</p>
<p>CAKE focuses on a smooth use experience, sacrificing some flexibility
in the model definition, originally allowing only two primary
metabolites in parallel. The current version 3.4 of CAKE released in May
2020 uses a scheme for up to six metabolites in a flexible arrangement
and supports biphasic modelling of metabolites, but does not support
back-reactions (non-instantaneous equilibria).</p>
<p>KinGUI offers an even more flexible widget for specifying complex
kinetic models. Back-reactions (non-instantaneous equilibria) were
supported early on, but until 2014, only simple first-order models could
be specified for transformation products. Starting with KinGUII version
2.1, biphasic modelling of metabolites was also available in
KinGUII.</p>
<p>A further graphical user interface (GUI) that has recently been
brought to a decent degree of maturity is the browser based GUI named
<code>gmkin</code>. Please see its <a href="https://pkgdown.jrwb.de/gmkin/" class="external-link">documentation page</a> and <a href="https://pkgdown.jrwb.de/gmkin/articles/gmkin_manual.html" class="external-link">manual</a>
for further information.</p>
<p>A comparison of scope, usability and numerical results obtained with
these tools has been recently been published by <span class="citation">Johannes Ranke, Wöltjen, and Meinecke
(2018)</span>.</p>
</div>
</div>
<div class="section level2">
<h2 id="unique-features">Unique features<a class="anchor" aria-label="anchor" href="#unique-features"></a>
</h2>
<p>Currently, the main unique features available in <code>mkin</code>
are</p>
<ul>
<li>the <a href="https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html">speed
increase</a> by using compiled code when a compiler is present,</li>
<li>parallel model fitting on multicore machines using the <a href="https://pkgdown.jrwb.de/mkin/reference/mmkin.html"><code>mmkin</code>
function</a>,</li>
<li>the estimation of parameter confidence intervals based on
transformed parameters (see below) and</li>
<li>the possibility to use the <a href="https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html">two-component
error model</a>
</li>
</ul>
<p>The iteratively reweighted least squares fitting of different
variances for each variable as introduced by <span class="citation">Gao
et al. (2011)</span> has been available in mkin since <a href="https://pkgdown.jrwb.de/mkin/news/index.html#mkin-0-9-22-2013-10-26">version
0.9-22</a>. With <a href="https://pkgdown.jrwb.de/mkin/news/index.html#mkin-0-9-49-5-2019-07-04">release
0.9.49.5</a>, the IRLS algorithm has been complemented by direct or
step-wise maximisation of the likelihood function, which makes it
possible not only to fit the variance by variable error model but also a
<a href="https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html">two-component
error model</a> inspired by error models developed in analytical
chemistry <span class="citation">(Johannes Ranke and Meinecke
2019)</span>.</p>
</div>
<div class="section level2">
<h2 id="internal-parameter-transformations">Internal parameter transformations<a class="anchor" aria-label="anchor" href="#internal-parameter-transformations"></a>
</h2>
<p>For rate constants, the log transformation is used, as proposed by
Bates and Watts <span class="citation">(1988, 77, 149)</span>.
Approximate intervals are constructed for the transformed rate constants
<span class="citation">(compare Bates and Watts 1988, 135)</span>,
<em>i.e.</em> for their logarithms. Confidence intervals for the rate
constants are then obtained using the appropriate backtransformation
using the exponential function.</p>
<p>In the first version of <code>mkin</code> allowing for specifying
models using formation fractions, a home-made reparameterisation was
used in order to ensure that the sum of formation fractions would not
exceed unity.</p>
<p>This method is still used in the current version of KinGUII (v2.1
from April 2014), with a modification that allows for fixing the pathway
to sink to zero. CAKE uses penalties in the objective function in order
to enforce this constraint.</p>
<p>In 2012, an alternative reparameterisation of the formation fractions
was proposed together with René Lehmann <span class="citation">(J. Ranke
and Lehmann 2012)</span>, based on isometric logratio transformation
(ILR). The aim was to improve the validity of the linear approximation
of the objective function during the parameter estimation procedure as
well as in the subsequent calculation of parameter confidence intervals.
In the current version of mkin, a logit transformation is used for
parameters that are bound between 0 and 1, such as the g parameter of
the DFOP model.</p>
<div class="section level3">
<h3 id="confidence-intervals-based-on-transformed-parameters">Confidence intervals based on transformed parameters<a class="anchor" aria-label="anchor" href="#confidence-intervals-based-on-transformed-parameters"></a>
</h3>
<p>In the first attempt at providing improved parameter confidence
intervals introduced to <code>mkin</code> in 2013, confidence intervals
obtained from FME on the transformed parameters were simply all
backtransformed one by one to yield asymmetric confidence intervals for
the backtransformed parameters.</p>
<p>However, while there is a 1:1 relation between the rate constants in
the model and the transformed parameters fitted in the model, the
parameters obtained by the isometric logratio transformation are
calculated from the set of formation fractions that quantify the paths
to each of the compounds formed from a specific parent compound, and no
such 1:1 relation exists.</p>
<p>Therefore, parameter confidence intervals for formation fractions
obtained with this method only appear valid for the case of a single
transformation product, where currently the logit transformation is used
for the formation fraction.</p>
<p>The confidence intervals obtained by backtransformation for the cases
where a 1:1 relation between transformed and original parameter exist
are considered by the author of this vignette to be more accurate than
those obtained using a re-estimation of the Hessian matrix after
backtransformation, as implemented in the FME package.</p>
</div>
<div class="section level3">
<h3 id="parameter-t-test-based-on-untransformed-parameters">Parameter t-test based on untransformed parameters<a class="anchor" aria-label="anchor" href="#parameter-t-test-based-on-untransformed-parameters"></a>
</h3>
<p>The standard output of many nonlinear regression software packages
includes the results from a test for significant difference from zero
for all parameters. Such a test is also recommended to check the
validity of rate constants in the FOCUS guidance <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014,
96ff)</span>.</p>
<p>It has been argued that the precondition for this test, <em>i.e.</em>
normal distribution of the estimator for the parameters, is not
fulfilled in the case of nonlinear regression <span class="citation">(J.
Ranke and Lehmann 2015)</span>. However, this test is commonly used by
industry, consultants and national authorities in order to decide on the
reliability of parameter estimates, based on the FOCUS guidance
mentioned above. Therefore, the results of this one-sided t-test are
included in the summary output from <code>mkin</code>.</p>
<p>As it is not reasonable to test for significant difference of the
transformed parameters (<em>e.g.</em> <span class="math inline">\(log(k)\)</span>) from zero, the t-test is
calculated based on the model definition before parameter
transformation, <em>i.e.</em> in a similar way as in packages that do
not apply such an internal parameter transformation. A note is included
in the <code>mkin</code> output, pointing to the fact that the t-test is
based on the unjustified assumption of normal distribution of the
parameter estimators.</p>
</div>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a>
</h2>
<!-- vim: set foldmethod=syntax: -->
<div id="refs" class="references csl-bib-body hanging-indent">
<div id="ref-bates1988" class="csl-entry">
Bates, D., and D. Watts. 1988. <em>Nonlinear Regression and Its
Applications</em>. Wiley-Interscience.
</div>
<div id="ref-FOCUS2006" class="csl-entry">
FOCUS Work Group on Degradation Kinetics. 2006. <em>Guidance Document on
Estimating Persistence and Degradation Kinetics from Environmental Fate
Studies on Pesticides in EU Registration. Report of the FOCUS Work Group
on Degradation Kinetics</em>. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.
</div>
<div id="ref-FOCUSkinetics2014" class="csl-entry">
———. 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="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.
</div>
<div id="ref-gao11" class="csl-entry">
Gao, Z., J. W. Green, J. Vanderborght, and W. Schmitt. 2011.
<span>“Improving Uncertainty Analysis in Kinetic Evaluations Using
Iteratively Reweighted Least Squares.”</span> Journal. <em>Environmental
Science and Technology</em> 45: 4429–37.
</div>
<div id="ref-pkg:mkin" class="csl-entry">
Ranke, J. 2021. <em>‘<span class="nocase">mkin</span>‘:
<span>K</span>inetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin" class="external-link">https://CRAN.R-project.org/package=mkin</a>.
</div>
<div id="ref-ranke2012" class="csl-entry">
Ranke, J., and R. Lehmann. 2012. <span>“Parameter Reliability in Kinetic
Evaluation of Environmental Metabolism Data - Assessment and the
Influence of Model Specification.”</span> In <em>SETAC World 20-24
May</em>. Berlin. <a href="https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf" class="external-link">https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf</a>.
</div>
<div id="ref-ranke2015" class="csl-entry">
———. 2015. <span>“To t-Test or Not to t-Test, That Is the
Question.”</span> In <em>XV Symposium on Pesticide Chemistry 2-4
September 2015</em>. Piacenza. <a href="https://jrwb.de/posters/piacenza_2015.pdf" class="external-link">https://jrwb.de/posters/piacenza_2015.pdf</a>.
</div>
<div id="ref-ranke2019" class="csl-entry">
Ranke, Johannes, and Stefan Meinecke. 2019. <span>“Error Models for the
Kinetic Evaluation of Chemical Degradation Data.”</span>
<em>Environments</em> 6 (12). <a href="https://doi.org/10.3390/environments6120124" class="external-link">https://doi.org/10.3390/environments6120124</a>.
</div>
<div id="ref-ranke2018" class="csl-entry">
Ranke, Johannes, Janina Wöltjen, and Stefan Meinecke. 2018.
<span>“Comparison of Software Tools for Kinetic Evaluation of Chemical
Degradation Data.”</span> <em>Environmental Sciences Europe</em> 30 (1):
17. <a href="https://doi.org/10.1186/s12302-018-0145-1" class="external-link">https://doi.org/10.1186/s12302-018-0145-1</a>.
</div>
<div id="ref-schaefer2007" class="csl-entry">
Schäfer, D., B. Mikolasch, P. Rainbird, and B. Harvey. 2007.
<span>“<span>KinGUI</span>: A New Kinetic Software Tool for Evaluations
According to <span>FOCUS</span> Degradation Kinetics.”</span> In
<em>Proceedings of the XIII Symposium Pesticide Chemistry</em>, edited
by Del Re A. A. M., Capri E., Fragoulis G., and Trevisan M., 916–23.
Piacenza.
</div>
<div id="ref-soetaert2010" class="csl-entry">
Soetaert, Karline, and Thomas Petzoldt. 2010. <span>“Inverse Modelling,
Sensitivity and Monte Carlo Analysis in <span>R</span> Using Package
<span>FME</span>.”</span> <em>Journal of Statistical Software</em> 33
(3): 1–28. <a href="https://doi.org/10.18637/jss.v033.i03" class="external-link">https://doi.org/10.18637/jss.v033.i03</a>.
</div>
</div>
</div>
  </div>

  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

        <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
    </nav>
</div>

</div>



      <footer><div class="copyright">
  <p></p>
<p>Developed by Johannes Ranke.</p>
</div>

<div class="pkgdown">
  <p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>

      </footer>
</div>

  


  

  </body>
</html>

Contact - Imprint