aboutsummaryrefslogtreecommitdiff
path: root/docs/articles/mkin.html
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-02-15 17:05:19 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-02-15 17:05:19 +0100
commit11c7f26dd6c532d977d9875f3c16952c7bba37ca (patch)
tree03393f3e63f1db688166e82fff7a8d16bb239154 /docs/articles/mkin.html
parentc4f327e62f19c0a3fc77a538f7cf0c2c619019d8 (diff)
parenta9427a09abdf7ce9aaeae7c7190f90c8f2e5ef52 (diff)
Merge branch 'master' into saemix
Diffstat (limited to 'docs/articles/mkin.html')
-rw-r--r--docs/articles/mkin.html59
1 files changed, 34 insertions, 25 deletions
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html
index e240323f..6dbb093d 100644
--- a/docs/articles/mkin.html
+++ b/docs/articles/mkin.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">1.0.0</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.0.3</span>
</span>
</div>
@@ -94,13 +94,13 @@
- </header><div class="row">
+ </header><script src="mkin_files/header-attrs-2.6/header-attrs.js"></script><script src="mkin_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
<h1 data-toc-skip>Introduction to mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2021-02-03</h4>
+ <h4 class="date">Last change 15 February 2021 (rebuilt 2021-02-15)</h4>
<small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/master/vignettes/mkin.rmd"><code>vignettes/mkin.rmd</code></a></small>
<div class="hidden name"><code>mkin.rmd</code></div>
@@ -148,28 +148,34 @@
<div id="background" class="section level1">
<h1 class="hasAnchor">
<a href="#background" class="anchor"></a>Background</h1>
-<p>Many approaches are possible regarding the evaluation of chemical degradation data.</p>
-<p>The <code>mkin</code> package <span class="citation">(Ranke 2019)</span> implements the approach 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> for simple decline data series, data series with transformation products, commonly termed metabolites, and for data series for more than one compartment. It is also possible to include back reactions, so equilibrium reactions and equilibrium partitioning can be specified, although this oftentimes leads to an overparameterisation of the model.</p>
+<p>The <code>mkin</code> package <span class="citation">(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 code was first uploaded to the BerliOS 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">the initial commit on 11 May 2010</a>), where the code is still occasionally 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 relative standard deviation that has to be assumed for the residuals, such that the <span class="math inline">\(\chi^2\)</span> goodness-of-fit test as defined by the FOCUS kinetics workgroup would pass using an significance level <span class="math inline">\(\alpha\)</span> of 0.05. This relative error, expressed as a percentage, is often termed <span class="math inline">\(\chi^2\)</span> error level or similar.</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, however, has become somehow obsolete, as the use of compiled code described below gives even smaller execution times.</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">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 id="derived-software-tools" class="section level2">
<h2 class="hasAnchor">
<a href="#derived-software-tools" class="anchor"></a>Derived software tools</h2>
-<p>Soon after the publication of <code>mkin</code>, two derived tools were published, namely KinGUII (available from 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.3 of CAKE release in March 2016 uses a basic scheme for up to six metabolites in a flexible arrangement, but does not support back-reactions (non-instantaneous equilibria) or biphasic kinetics for metabolites.</p>
+<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/">documentation page</a> and <a href="https://pkgdown.jrwb.de/gmkin/articles/gmkin_manual.html">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">Ranke, Wöltjen, and Meinecke (2018)</span>.</p>
</div>
-<div id="recent-developments" class="section level2">
-<h2 class="hasAnchor">
-<a href="#recent-developments" class="anchor"></a>Recent developments</h2>
-<p>Currently (July 2019), the main features available in <code>mkin</code> which are not present in KinGUII or CAKE, are the speed increase by using compiled code when a compiler is present, parallel model fitting on multicore machines using the <code>mmkin</code> function, and the estimation of parameter confidence intervals based on transformed parameters.</p>
-<p>In addition, the possibility to use two alternative error models to constant variance have been integrated. The variance by variable error model introduced by <span class="citation">Gao et al. (2011)</span> has been available via an iteratively reweighted least squares (IRLS) procedure since mkin <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 replaced 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.</p>
</div>
+<div id="unique-features" class="section level1">
+<h1 class="hasAnchor">
+<a href="#unique-features" class="anchor"></a>Unique features</h1>
+<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">(Ranke and Meinecke 2019)</span>.</p>
</div>
<div id="internal-parameter-transformations" class="section level1">
<h1 class="hasAnchor">
@@ -177,13 +183,13 @@
<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">(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.</p>
+<p>In 2012, an alternative reparameterisation of the formation fractions was proposed together with René Lehmann <span class="citation">(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 id="confidence-intervals-based-on-transformed-parameters" class="section level2">
<h2 class="hasAnchor">
<a href="#confidence-intervals-based-on-transformed-parameters" class="anchor"></a>Confidence intervals based on transformed parameters</h2>
<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 only one formation fraction is to be estimated, directly corresponding to one component of the ilr transformed parameter.</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 id="parameter-t-test-based-on-untransformed-parameters" class="section level2">
@@ -198,36 +204,39 @@
<h1 class="hasAnchor">
<a href="#references" class="anchor"></a>References</h1>
<!-- vim: set foldmethod=syntax: -->
-<div id="refs" class="references">
+<div id="refs" class="references hanging-indent">
<div id="ref-bates1988">
<p>Bates, D., and D. Watts. 1988. <em>Nonlinear Regression and Its Applications</em>. Wiley-Interscience.</p>
</div>
<div id="ref-FOCUS2006">
-<p>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="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
+<p>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">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
</div>
<div id="ref-FOCUSkinetics2014">
-<p>———. 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>
+<p>———. 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">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
</div>
<div id="ref-gao11">
-<p>Gao, Z., J.W. Green, J. Vanderborght, and W. Schmitt. 2011. “Improving Uncertainty Analysis in Kinetic Evaluations Using Iteratively Reweighted Least Squares.” Journal. <em>Environmental Science and Technology</em> 45: 4429–37.</p>
+<p>Gao, Z., J. W. Green, J. Vanderborght, and W. Schmitt. 2011. “Improving Uncertainty Analysis in Kinetic Evaluations Using Iteratively Reweighted Least Squares.” Journal. <em>Environmental Science and Technology</em> 45: 4429–37.</p>
</div>
<div id="ref-pkg:mkin">
-<p>Ranke, J. 2019. <em>‘mkin‘: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin" class="uri">https://CRAN.R-project.org/package=mkin</a>.</p>
+<p>Ranke, J. 2021. <em>‘mkin‘: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin">https://CRAN.R-project.org/package=mkin</a>.</p>
</div>
<div id="ref-ranke2012">
<p>Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In <em>SETAC World 20-24 May</em>. Berlin.</p>
</div>
<div id="ref-ranke2015">
-<p>———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In <em>XV Symposium on Pesticide Chemistry 2-4 September 2015</em>. Piacenza. <a href="http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf" class="uri">http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf</a>.</p>
+<p>———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In <em>XV Symposium on Pesticide Chemistry 2-4 September 2015</em>. Piacenza. <a href="http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf">http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf</a>.</p>
+</div>
+<div id="ref-ranke2019">
+<p>Ranke, Johannes, and Stefan Meinecke. 2019. “Error Models for the Kinetic Evaluation of Chemical Degradation Data.” <em>Environments</em> 6 (12). <a href="https://doi.org/10.3390/environments6120124">https://doi.org/10.3390/environments6120124</a>.</p>
</div>
<div id="ref-ranke2018">
-<p>Ranke, Johannes, Janina Wöltjen, and Stefan Meinecke. 2018. “Comparison of Software Tools for Kinetic Evaluation of Chemical Degradation Data.” <em>Environmental Sciences Europe</em> 30 (1): 17. <a href="https://doi.org/10.1186/s12302-018-0145-1" class="uri">https://doi.org/10.1186/s12302-018-0145-1</a>.</p>
+<p>Ranke, Johannes, Janina Wöltjen, and Stefan Meinecke. 2018. “Comparison of Software Tools for Kinetic Evaluation of Chemical Degradation Data.” <em>Environmental Sciences Europe</em> 30 (1): 17. <a href="https://doi.org/10.1186/s12302-018-0145-1">https://doi.org/10.1186/s12302-018-0145-1</a>.</p>
</div>
<div id="ref-schaefer2007">
<p>Schäfer, D., B. Mikolasch, P. Rainbird, and B. Harvey. 2007. “KinGUI: A New Kinetic Software Tool for Evaluations According to FOCUS Degradation Kinetics.” 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.</p>
</div>
<div id="ref-soetaert2010">
-<p>Soetaert, Karline, and Thomas Petzoldt. 2010. “Inverse Modelling, Sensitivity and Monte Carlo Analysis in R Using Package FME.” <em>Journal of Statistical Software</em> 33 (3): 1–28. <a href="https://www.jstatsoft.org/v33/i03/" class="uri">https://www.jstatsoft.org/v33/i03/</a>.</p>
+<p>Soetaert, Karline, and Thomas Petzoldt. 2010. “Inverse Modelling, Sensitivity and Monte Carlo Analysis in R Using Package FME.” <em>Journal of Statistical Software</em> 33 (3): 1–28. <a href="https://www.jstatsoft.org/v33/i03/">https://www.jstatsoft.org/v33/i03/</a>.</p>
</div>
</div>
</div>

Contact - Imprint