aboutsummaryrefslogblamecommitdiff
path: root/docs/index.html
blob: 2917f01277df5d810c4216f0af4bf316ad266d18 (plain) (tree)
1
2
3
4
5
6
               
                                                                  



                                                                   












                                                                                                
                                                                       


                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          


                                                                                                       
                                                                           


                                                                            




                                                                                   
                                                                                                                                                                                                                                                                                                                                                                                                                    

                                                                               

            

                                                                          

    









                                                                                                                                                                                
 



                                                               
     


























                                                                                                                                                                                             
     

                                                     
     
           







                                                                                                                                                                                                           



           
      
 




                                                               

                                                                                                  

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  



                                                                                                                                                       
                                                                   
                                                                                                                                                                                                                                                                     
      


                                                                                           
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
      
                            
                                                                                              
     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
      


                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                                  
      





                                                                                     
    


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

                                                                                                                                                                                                                                
                                                                                                                                                                                 

      


                                                                                                       




                                                                                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

      


                                                                                              

                                                                                                                                                                                           

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             


      


                                                                      
                                                                                                                                                                                                                                                                                                                                                           
      



                                                                                                                                                                                                                                                                                                    
      




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                  


                                                                                                                                                                                                                                      
                                                                                                                           
                                                                                                  
                                                                         

                                                                                                                                                                                                                 
                                                                                                                                                                              
                                                                                                                                    
     

                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                   
      


                                                                                           
                     

    




                                                                                                                                                                                                                                                                                                                                             












                                                                                                                                                                                                                                                                                                             




                                                                                                                                                                                                                                                  

        


                                                                                              
                                 

      
                                                    
                            
                          


                                                                                                  
     
      
 
                     
                              



                          



                               
                          
                                                        
     

      

                                 
                          

                                                                                                                                                                                                                                                                               
     
      
 
 
 
          
      
 
 
                                             

                                   

      
                                  
         
                                                                                                    
      
 
             
      
 

  

  

         
<!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, shrink-to-fit=no">
<meta name="description" content="Calculation routines based on the FOCUS Kinetics Report (2006,
  2014).  Includes a function for conveniently defining differential equation
  models, model solution based on eigenvalues if possible or using numerical
  solvers.  If a C compiler (on windows: Rtools) is installed, differential
  equation models are solved using automatically generated C functions.
  Heteroscedasticity can be taken into account using variance by variable or
  two-component error models as described by Ranke and Meinecke (2018)
  &lt;doi:10.3390/environments6120124&gt;.  Hierarchical degradation models can
  be fitted using nonlinear mixed-effects model packages as a back end as
  described by Ranke et al. (2021) &lt;doi:10.3390/environments8080071&gt;.  Please
  note that no warranty is implied for correctness of results or fitness for a
  particular purpose.">
<title>Kinetic Evaluation of Chemical Degradation Data • mkin</title>
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet">
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.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">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" 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><!-- 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><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Kinetic Evaluation of Chemical Degradation Data">
<meta property="og:description" content="Calculation routines based on the FOCUS Kinetics Report (2006,
  2014).  Includes a function for conveniently defining differential equation
  models, model solution based on eigenvalues if possible or using numerical
  solvers.  If a C compiler (on windows: Rtools) is installed, differential
  equation models are solved using automatically generated C functions.
  Heteroscedasticity can be taken into account using variance by variable or
  two-component error models as described by Ranke and Meinecke (2018)
  &lt;doi:10.3390/environments6120124&gt;.  Hierarchical degradation models can
  be fitted using nonlinear mixed-effects model packages as a back end as
  described by Ranke et al. (2021) &lt;doi:10.3390/environments8080071&gt;.  Please
  note that no warranty is implied for correctness of results or fitness for a
  particular purpose.">
<!-- 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>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
    

    <nav class="navbar fixed-top navbar-default navbar-expand-lg bg-light"><div class="container">
    
    <a class="navbar-brand me-2" href="index.html">mkin</a>

    <small class="nav-text text-default me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">1.2.6</small>

    
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto">
<li class="nav-item">
  <a class="nav-link" href="reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
  <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
  <div class="dropdown-menu" aria-labelledby="dropdown-articles">
    <a class="dropdown-item" href="articles/mkin.html">Introduction to mkin</a>
    <div class="dropdown-divider"></div>
    <h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6>
    <a class="dropdown-item" href="articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
    <a class="dropdown-item" href="articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
    <a class="dropdown-item" href="articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
    <div class="dropdown-divider"></div>
    <h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6>
    <a class="dropdown-item" href="articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a>
    <a class="dropdown-item" href="articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a>
    <a class="dropdown-item" href="articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a>
    <a class="dropdown-item" href="articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a>
    <a class="dropdown-item" href="articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a>
    <a class="dropdown-item" href="articles/web_only/multistart.html">Short demo of the multistart method</a>
    <div class="dropdown-divider"></div>
    <h6 class="dropdown-header" data-toc-skip>Performance</h6>
    <a class="dropdown-item" href="articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
    <a class="dropdown-item" href="articles/web_only/benchmarks.html">Benchmark timings for mkin</a>
    <a class="dropdown-item" href="articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a>
    <div class="dropdown-divider"></div>
    <h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6>
    <a class="dropdown-item" href="articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
    <a class="dropdown-item" href="articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
  </div>
</li>
<li class="nav-item">
  <a class="nav-link" href="news/index.html">News</a>
</li>
      </ul>
<form class="form-inline my-2 my-lg-0" role="search">
        <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>

      <ul class="navbar-nav">
<li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="github">
    <span class="fab fa fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
</div>

    
  </div>
</nav><div class="container template-home">
<div class="row">
  <main id="main" class="col-md-9"><div class="section level1">
<div class="page-header"><h1 id="mkin">mkin<a class="anchor" aria-label="anchor" href="#mkin"></a>
</h1></div>
<p><a href="https://cran.r-project.org/package=mkin" class="external-link"><img src="https://www.r-pkg.org/badges/version/mkin"></a> <a href="https://jranke.r-universe.dev/ui/#package:mkin" class="external-link"><img src="https://jranke.r-universe.dev/badges/mkin" alt="mkin status badge"></a> <a href="https://app.travis-ci.com/github/jranke/mkin" class="external-link"><img src="https://travis-ci.com/jranke/mkin.svg?branch=main" alt="Build Status"></a> <a href="https://app.codecov.io/gh/jranke/mkin" class="external-link"><img src="https://codecov.io/github/jranke/mkin/branch/main/graphs/badge.svg" alt="codecov"></a></p>
<p>The <a href="https://www.r-project.org" class="external-link">R</a> package <strong>mkin</strong> provides calculation routines for the analysis of chemical degradation data, including <b>m</b>ulticompartment <b>kin</b>etics as needed for modelling the formation and decline of transformation products, or if several degradation compartments are involved. It provides stable functionality for kinetic evaluations according to the FOCUS guidance (see below for details). In addition, it provides functionality to do hierarchical kinetics based on nonlinear mixed-effects models.</p>
<div class="section level2">
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h2>
<p>You can install the latest released version from <a href="https://cran.r-project.org/package=mkin" class="external-link">CRAN</a> from within R:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"mkin"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="background">Background<a class="anchor" aria-label="anchor" href="#background"></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 and various helpful tools have been developed as detailed in ‘Credits and historical remarks’ below. This package aims to provide a one stop solution for degradation kinetics, addressing modellers that are willing to, or even prefer to work with R.</p>
</div>
<div class="section level2">
<h2 id="basic-usage">Basic usage<a class="anchor" aria-label="anchor" href="#basic-usage"></a>
</h2>
<p>For a start, have a look at the code examples provided for <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html"><code>plot.mkinfit</code></a> and <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html"><code>plot.mmkin</code></a>, and at the package vignettes <a href="https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html"><code>FOCUS L</code></a> and <a href="https://pkgdown.jrwb.de/mkin/articles/FOCUS_D.html"><code>FOCUS D</code></a>.</p>
</div>
<div class="section level2">
<h2 id="documentation">Documentation<a class="anchor" aria-label="anchor" href="#documentation"></a>
</h2>
<p>The HTML documentation of the latest version released to CRAN is available at <a href="https://pkgdown.jrwb.de/mkin/">jrwb.de</a> and <a href="https://jranke.github.io/mkin/" class="external-link">github</a>.</p>
<p>Documentation of the development version is found in the <a href="https://pkgdown.jrwb.de/mkin/dev/">‘dev’ subdirectory</a>. In the articles section of this documentation, you can also find demonstrations of the application of nonlinear hierarchical models, also known as nonlinear mixed-effects models, to more complex data, including transformation products and covariates.</p>
</div>
<div class="section level2">
<h2 id="features">Features<a class="anchor" aria-label="anchor" href="#features"></a>
</h2>
<div class="section level3">
<h3 id="general">General<a class="anchor" aria-label="anchor" href="#general"></a>
</h3>
<ul>
<li>Highly flexible model specification using <a href="https://pkgdown.jrwb.de/mkin/reference/mkinmod.html"><code>mkinmod</code></a>, including equilibrium reactions and using the single first-order reversible binding (SFORB) model, which will automatically create two state variables for the observed variable.</li>
<li>Model solution (forward modelling) in the function <a href="https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html"><code>mkinpredict</code></a> is performed either using the analytical solution for the case of parent only degradation or some simple models involving a single transformation product, , an eigenvalue based solution if only simple first-order (SFO) or SFORB kinetics are used in the model, or using a numeric solver from the <code>deSolve</code> package (default is <code>lsoda</code>).</li>
<li>The usual one-sided t-test for significant difference from zero is shown based on estimators for the untransformed parameters.</li>
<li>Summary and plotting functions. The <code>summary</code> of an <code>mkinfit</code> object is in fact a full report that should give enough information to be able to approximately reproduce the fit with other tools.</li>
<li>The chi-squared error level as defined in the FOCUS kinetics guidance (see below) is calculated for each observed variable.</li>
<li>The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) can be specified as <code>error_model = "obs"</code>.</li>
</ul>
</div>
<div class="section level3">
<h3 id="unique-in-mkin">Unique in mkin<a class="anchor" aria-label="anchor" href="#unique-in-mkin"></a>
</h3>
<ul>
<li>Three different error models can be selected using the argument <code>error_model</code> to the <a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html"><code>mkinfit</code></a> function. A two-component error model similar to the one proposed by <a href="https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html">Rocke and Lorenzato</a> can be selected using the argument <code>error_model = "tc"</code>.</li>
<li>Model comparisons using the Akaike Information Criterion (AIC) are supported which can also be used for non-constant variance. In such cases the FOCUS chi-squared error level is not meaningful.</li>
<li>By default, kinetic rate constants and kinetic formation fractions are transformed internally using <a href="https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html"><code>transform_odeparms</code></a> so their estimators can more reasonably be expected to follow a normal distribution.</li>
<li>When parameter estimates are backtransformed to match the model definition, confidence intervals calculated from standard errors are also backtransformed to the correct scale, and will not include meaningless values like negative rate constants or formation fractions adding up to more than 1, which cannot occur in a single experiment with a single defined radiolabel position.</li>
<li>When a metabolite decline phase is not described well by SFO kinetics, SFORB kinetics can be used for the metabolite. Mathematically, the SFORB model is equivalent to the DFOP model. However, the SFORB model has the advantage that there is a mechanistic interpretation of the model parameters.</li>
<li>Nonlinear mixed-effects models (hierarchical models) can be created from fits of the same degradation model to different datasets for the same compound by using the <a href="https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html">nlme.mmkin</a> and <a href="https://pkgdown.jrwb.de/mkin/reference/saem.html">saem.mmkin</a> methods. Note that the convergence of the nlme fits depends on the quality of the data. Convergence is better for simple models and data for many groups (e.g. soils). The saem method uses the <code>saemix</code> package as a backend. Analytical solutions suitable for use with this package have been implemented for parent only models and the most important models including one metabolite (SFO-SFO and DFOP-SFO). Fitting other models with <code>saem.mmkin</code>, while it makes use of the compiled ODE models that mkin provides, has longer run times (from a couple of minutes to more than an hour).</li>
</ul>
</div>
<div class="section level3">
<h3 id="performance">Performance<a class="anchor" aria-label="anchor" href="#performance"></a>
</h3>
<ul>
<li>Parallel fitting of several models to several datasets is supported, see for example <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html"><code>plot.mmkin</code></a>.</li>
<li>If a C compiler is installed, the kinetic models are compiled from automatically generated C code, see <a href="https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html">vignette <code>compiled_models</code></a>. The autogeneration of C code was inspired by the <a href="https://github.com/karlines/ccSolve" class="external-link"><code>ccSolve</code></a> package. Thanks to Karline Soetaert for her work on that.</li>
<li>Even if no compiler is installed, many degradation models still give <a href="https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html">very good performance</a>, as current versions of mkin also have <a href="https://jrwb.de/performance-improvements-mkin/" class="external-link">analytical solutions for some models with one metabolite</a>, and if SFO or SFORB are used for the parent compound, Eigenvalue based solutions of the degradation model are available.</li>
</ul>
</div>
</div>
<div class="section level2">
<h2 id="gui">GUI<a class="anchor" aria-label="anchor" href="#gui"></a>
</h2>
<p>There is a graphical user interface that may be useful. Please refer to its <a href="https://pkgdown.jrwb.de/gmkin/" class="external-link">documentation page</a> for installation instructions and a manual. It only supports evaluations using (generalised) nonlinear regression, but not simultaneous fits using nonlinear mixed-effects models.</p>
</div>
<div class="section level2">
<h2 id="news">News<a class="anchor" aria-label="anchor" href="#news"></a>
</h2>
<p>There is a list of changes for the latest <a href="https://cran.r-project.org/package=mkin/news/news.html" class="external-link">CRAN release</a> and one for each github branch, e.g. <a href="https://github.com/jranke/mkin/blob/main/NEWS.md" class="external-link">the main branch</a>.</p>
</div>
<div class="section level2">
<h2 id="credits-and-historical-remarks">Credits and historical remarks<a class="anchor" aria-label="anchor" href="#credits-and-historical-remarks"></a>
</h2>
<p><code>mkin</code> would not be possible without the underlying software stack consisting of, among others, R and the package <a href="https://cran.r-project.org/package=deSolve" class="external-link">deSolve</a>. In previous version, <code>mkin</code> was also using the functionality of the <a href="https://cran.r-project.org/package=FME" class="external-link">FME</a> package. Please refer to the <a href="https://cran.r-project.org/package=mkin" class="external-link">package page on CRAN</a> for the full list of imported and suggested R packages. Also, <a href="https://debian.org" class="external-link">Debian Linux</a>, the vim editor and the <a href="https://github.com/jalvesaq/Nvim-R" class="external-link">Nvim-R</a> plugin have been invaluable in its development.</p>
<p><code>mkin</code> could not have been written without me being introduced to regulatory fate modelling of pesticides by Adrian Gurney during my time at Harlan Laboratories Ltd (formerly RCC Ltd). <code>mkin</code> greatly profits from and largely follows the work done by the <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">FOCUS Degradation Kinetics Workgroup</a>, as detailed in their guidance document from 2006, slightly updated in 2011 and in 2014.</p>
<p>Also, it was inspired by the first version of KinGUI developed by BayerCropScience, which is based on the MatLab runtime environment.</p>
<p>The companion package <a href="http://kinfit.r-forge.r-project.org/kinfit_static/index.html" class="external-link">kinfit</a> (now deprecated) was <a href="https://r-forge.r-project.org/scm/viewvc.php?view=rev&amp;root=kinfit&amp;revision=2" class="external-link">started in 2008</a> and <a href="https://cran.r-project.org/src/contrib/Archive/kinfit/" class="external-link">first published</a> on CRAN on 01 May 2010.</p>
<p>The first <code>mkin</code> code was <a href="https://r-forge.r-project.org/scm/viewvc.php?view=rev&amp;root=kinfit&amp;revision=8" class="external-link">published on 11 May 2010</a> and the <a href="https://cran.r-project.org/src/contrib/Archive/mkin/" class="external-link">first CRAN version</a> on 18 May 2010.</p>
<p>In 2011, Bayer Crop Science started to distribute an R based successor to KinGUI named KinGUII whose R code is based on <code>mkin</code>, but which added, among other refinements, a closed source graphical user interface (GUI), iteratively reweighted least squares (IRLS) optimisation of the variance for each of the observed variables, and Markov Chain Monte Carlo (MCMC) simulation functionality, similar to what is available e.g. in the <code>FME</code> package.</p>
<p>Somewhat in parallel, Syngenta has sponsored the development of an <code>mkin</code> and KinGUII based GUI application called CAKE, which also adds IRLS and MCMC, is more limited in the model formulation, but puts more weight on usability. CAKE is available for download from the <a href="https://cake-kinetics.org" class="external-link">CAKE website</a>, where you can also find a zip archive of the R scripts derived from <code>mkin</code>, published under the GPL license.</p>
<p>Finally, there is <a href="https://github.com/zhenglei-gao/KineticEval" class="external-link">KineticEval</a>, which contains some further development of the scripts used for KinGUII.</p>
<p>Thanks to René Lehmann, formerly working at the Umweltbundesamt, for the nice cooperation on parameter transformations, especially the isometric log-ratio transformation that is now used for formation fractions in case there are more than two transformation targets.</p>
<p>Many inspirations for improvements of mkin resulted from doing kinetic evaluations of degradation data for my clients while working at Harlan Laboratories and at Eurofins Regulatory AG, and now as an independent consultant.</p>
<p>Funding was received from the Umweltbundesamt in the course of the projects</p>
<ul>
<li>Project Number 27452 (Testing and validation of modelling software as an alternative to ModelMaker 4.0, 2014-2015)</li>
<li>Project Number 56703 (Optimization of gmkin for routine use in the Umweltbundesamt, 2015)</li>
<li>Project Number 92570 (Update of Project Number 27452, 2017-2018)</li>
<li>Project Number 112407 (Testing the feasibility of using an error model according to Rocke and Lorenzato for more realistic parameter estimates in the kinetic evaluation of degradation data, 2018-2019)</li>
<li>Project Number 120667 (Development of objective criteria for the evaluation of the visual fit in the kinetic evaluation of degradation data, 2019-2020)</li>
<li>Project Number 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021)</li>
<li>Project Number 173340 (Application of nonlinear hierarchical models to the kinetic evaluation of chemical degradation data)</li>
</ul>
<p>Thanks to everyone involved for collaboration and support!</p>
<p>Thanks are due also to Emmanuelle Comets, maintainer of the saemix package, for her interest and support for using the SAEM algorithm and its implementation in saemix for the evaluation of chemical degradation data.</p>
<p>Regarding the application of nonlinear mixed-effects models to degradation data, von Götz et al (1999) have already proposed to use this technique in the context of environmental risk assessments of pesticides. However, this work was apparently not followed up, which is why we had to independently arrive at the idea and missed to cite this previous work on the topic in our first publications.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a>
</h2>
<table class="table">
<tr>
<td>
Ranke J (2023) Application of nonlinear hierarchical models to the kinetic evaluation of chemical degradation data - Guidance for the use of an R markdown template file. <a href="https://www.umweltbundesamt.de/publikationen/application-of-nonlinear-hierarchical-models-to-the" class="external-link">Umweltbundesamt TEXTE 151/2023</a>
</td>
</tr>
<tr>
<td>
Ranke J, Wöltjen J, Schmidt J, and Comets E (2021) Taking kinetic evaluations of degradation data to the next level with nonlinear mixed-effects models. <i>Environments</i> <b>8</b> (8) 71 <a href="https://doi.org/10.3390/environments8080071" class="external-link">doi:10.3390/environments8080071</a>
</td>
</tr>
<tr>
<td>
Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data <i>Environments</i> <b>6</b> (12) 124 <a href="https://doi.org/10.3390/environments6120124" class="external-link">doi:10.3390/environments6120124</a>
</td>
</tr>
<tr>
<td>
Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data <i>Environmental Sciences Europe</i> <b>30</b> 17 <a href="https://doi.org/10.1186/s12302-018-0145-1" class="external-link">doi:10.1186/s12302-018-0145-1</a>
</td>
</tr>
<tr>
<td>
Von Götz N, Nörtersheuser P, Richter O (1999) Population based analysis of pesticide kinetics <i>Chemosphere</i> <b>38</b> 7 <a href="https://doi.org/10.1016/S0045-6535(98)00388-9" class="external-link">doi:10.1016/S0045-6535(98)00388-9</a>
</td>
</tr>
</table>
</div>
<div class="section level2">
<h2 id="development">Development<a class="anchor" aria-label="anchor" href="#development"></a>
</h2>
<p>Contributions are welcome!</p>
</div>
</div>
  </main><aside class="col-md-3"><div class="links">
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li><a href="https://cloud.r-project.org/package=mkin" class="external-link">View on CRAN</a></li>
<li><a href="https://github.com/jranke/mkin/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/jranke/mkin/issues/" class="external-link">Report a bug</a></li>
</ul>
</div>

<div class="license">
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li>GPL</li>
</ul>
</div>


<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing mkin</a></li>
</ul>
</div>

<div class="developers">
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
<li><a href="authors.html">More about authors...</a></li>
</ul>
</div>



  </aside>
</div>


    <footer><div class="pkgdown-footer-left">
  <p></p>
<p>Developed by Johannes Ranke.</p>
</div>

<div class="pkgdown-footer-right">
  <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