From b3ca0aa552916b10a7d6d642138aecf744aed3de Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 28 Feb 2022 15:05:58 +0100 Subject: Update docs --- docs/dev/index.html | 170 ++++++++++++++++++++++++++++------------------------ 1 file changed, 92 insertions(+), 78 deletions(-) (limited to 'docs/dev/index.html') diff --git a/docs/dev/index.html b/docs/dev/index.html index fe365189..9490235c 100644 --- a/docs/dev/index.html +++ b/docs/dev/index.html @@ -31,6 +31,8 @@ + +
-
- +
+

The R package mkin provides calculation routines for the analysis of chemical degradation data, including multicompartment kinetics as needed for modelling the formation and decline of transformation products, or if several degradation compartments are involved.

-
-

-Installation

-

You can install the latest released version from CRAN from within R:

+
+

Installation +

+

You can install the latest released version from CRAN from within R:

+install.packages("mkin")
-
-

-Background

+
+

Background +

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 helpful tools have been developed as detailed in ‘Credits and historical remarks’ below.

-
-

-Usage

+
+

Usage +

For a start, have a look at the code examples provided for plot.mkinfit and plot.mmkin, and at the package vignettes FOCUS L and FOCUS D.

-
-

-Documentation

-

The HTML documentation of the latest version released to CRAN is available at jrwb.de and github. Documentation of the development version is found in the ‘dev’ subdirectory.

+
+

Documentation +

+

The HTML documentation of the latest version released to CRAN is available at jrwb.de and github. Documentation of the development version is found in the ‘dev’ subdirectory.

-
-

-Features

-
-

-General

+
+

Features +

+
+

General +

  • Highly flexible model specification using mkinmod, including equilibrium reactions and using the single first-order reversible binding (SFORB) model, which will automatically create two latent state variables for the observed variable.
  • Model solution (forward modelling) in the function mkinpredict is performed either using the analytical solution for the case of parent only degradation, 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 deSolve package (default is lsoda).
  • @@ -150,9 +152,9 @@
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
-
-

-Unique in mkin

+
+

Unique in mkin +

  • Three different error models can be selected using the argument error_model to the mkinfit function. A two-component error model similar to the one proposed by Rocke and Lorenzato can be selected using the argument error_model = "tc".
  • 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.
  • @@ -162,37 +164,37 @@
  • Nonlinear mixed-effects models can be created from fits of the same degradation model to different datasets for the same compound by using the nlme.mmkin method. 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).
-
-

-Performance

+
+

Performance +

  • Parallel fitting of several models to several datasets is supported, see for example plot.mmkin.
  • -
  • If a C compiler is installed, the kinetic models are compiled from automatically generated C code, see vignette compiled_models. The autogeneration of C code was inspired by the ccSolve package. Thanks to Karline Soetaert for her work on that.
  • -
  • Even if no compiler is installed, many degradation models still give very good performance, as current versions of mkin also have analytical solutions for some models with one metabolite, and if SFO or SFORB are used for the parent compound, Eigenvalue based solutions of the degradation model are available.
  • +
  • If a C compiler is installed, the kinetic models are compiled from automatically generated C code, see vignette compiled_models. The autogeneration of C code was inspired by the ccSolve package. Thanks to Karline Soetaert for her work on that.
  • +
  • Even if no compiler is installed, many degradation models still give very good performance, as current versions of mkin also have analytical solutions for some models with one metabolite, and if SFO or SFORB are used for the parent compound, Eigenvalue based solutions of the degradation model are available.
-
-

-GUI

-

There is a graphical user interface that may be useful. Please refer to its documentation page for installation instructions and a manual.

+
+

GUI +

+

There is a graphical user interface that may be useful. Please refer to its documentation page for installation instructions and a manual.

-
-

-News

-

There is a list of changes for the latest CRAN release and one for each github branch, e.g. the main branch.

+
+

News +

+

There is a list of changes for the latest CRAN release and one for each github branch, e.g. the main branch.

-
-

-Credits and historical remarks

-

mkin would not be possible without the underlying software stack consisting of, among others, R and the package deSolve. In previous version, mkin was also using the functionality of the FME package. Please refer to the package page on CRAN for the full list of imported and suggested R packages. Also, Debian Linux, the vim editor and the Nvim-R plugin have been invaluable in its development.

-

mkin 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). mkin greatly profits from and largely follows the work done by the FOCUS Degradation Kinetics Workgroup, as detailed in their guidance document from 2006, slightly updated in 2011 and in 2014.

+
+

Credits and historical remarks +

+

mkin would not be possible without the underlying software stack consisting of, among others, R and the package deSolve. In previous version, mkin was also using the functionality of the FME package. Please refer to the package page on CRAN for the full list of imported and suggested R packages. Also, Debian Linux, the vim editor and the Nvim-R plugin have been invaluable in its development.

+

mkin 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). mkin greatly profits from and largely follows the work done by the FOCUS Degradation Kinetics Workgroup, as detailed in their guidance document from 2006, slightly updated in 2011 and in 2014.

Also, it was inspired by the first version of KinGUI developed by BayerCropScience, which is based on the MatLab runtime environment.

-

The companion package kinfit (now deprecated) was started in 2008 and first published on CRAN on 01 May 2010.

-

The first mkin code was published on 11 May 2010 and the first CRAN version on 18 May 2010.

+

The companion package kinfit (now deprecated) was started in 2008 and first published on CRAN on 01 May 2010.

+

The first mkin code was published on 11 May 2010 and the first CRAN version on 18 May 2010.

In 2011, Bayer Crop Science started to distribute an R based successor to KinGUI named KinGUII whose R code is based on mkin, 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 FME package.

-

Somewhat in parallel, Syngenta has sponsored the development of an mkin 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 CAKE website, where you can also find a zip archive of the R scripts derived from mkin, published under the GPL license.

-

Finally, there is KineticEval, which contains a further development of the scripts used for KinGUII, so the different tools will hopefully be able to learn from each other in the future as well.

+

Somewhat in parallel, Syngenta has sponsored the development of an mkin 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 CAKE website, where you can also find a zip archive of the R scripts derived from mkin, published under the GPL license.

+

Finally, there is KineticEval, which contains a further development of the scripts used for KinGUII, so the different tools will hopefully be able to learn from each other in the future as well.

Thanks to René Lehmann, formerly working at the Umweltbundesamt, for the nice cooperation 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.

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.

Funding was received from the Umweltbundesamt in the course of the projects

@@ -205,30 +207,30 @@
  • Project Number 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021)
  • -
    -

    -References

    +
    +

    References +

    -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. Environments 8 (8) 71 doi:10.3390/environments8080071 +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. Environments 8 (8) 71 doi:10.3390/environments8080071
    -Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data Environments 6 (12) 124 doi:10.3390/environments6120124 +Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data Environments 6 (12) 124 doi:10.3390/environments6120124
    -Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data Environmental Sciences Europe 30 17 doi:10.1186/s12302-018-0145-1 +Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data Environmental Sciences Europe 30 17 doi:10.1186/s12302-018-0145-1
    -
    -

    -Development

    +
    +

    Development +

    Contributions are welcome!

    @@ -236,48 +238,58 @@ Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic