From 9097b8ba10660034a3672a367eab9d6e11505310 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 9 Dec 2015 10:08:04 +0100 Subject: Some updates and simplifications of the README --- README.html | 14 +++++--------- README.md | 29 +++++------------------------ 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/README.html b/README.html index 3a97d030..773b47cb 100644 --- a/README.html +++ b/README.html @@ -63,15 +63,12 @@ img {

mkin

-

+

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 compartments are involved.

Installation

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

install.packages("mkin")
-

If looking for the latest features, you can install directly from github, e.g. using the devtools package. Using quick = TRUE skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.

-
require(devtools)
-install_github("jranke/mkin", quick = TRUE)

Background

@@ -89,17 +86,16 @@ install_github("jranke/mkin", quick = TRUE)

Features

  • 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.
  • -
  • As of version 0.9-39, fitting of several models to several datasets, optionally in parallel, is supported, see for example plot.mmkin
  • +
  • As of version 0.9-39, fitting of several models to several datasets, optionally in parallel, is supported, see for example plot.mmkin.
  • 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).
  • 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.
  • -
  • Model optimisation with mkinfit internally using the modFit function from the FME package, but using the Port routine nlminb per default.
  • By default, kinetic rate constants and kinetic formation fractions are transformed internally using transform_odeparms so their estimators can more reasonably be expected to follow a normal distribution. This has the side effect that no constraints are needed in the optimisation. Thanks to René Lehmann for the nice cooperation on this, especially the isometric logration transformation that is now used for the formation fractions.
  • A side effect of this is that 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 can not occur in a single experiment with a single defined radiolabel position.
  • The usual one-sided t-test for significant difference from zero is nevertheless shown based on estimators for the untransformed parameters.
  • Summary and plotting functions. The summary of an mkinfit object is in fact a full report that should give enough information to be able to approximately reproduce the fit with other tools.
  • The chi-squared error level as defined in the FOCUS kinetics guidance (see below) is calculated for each observed variable.
  • Iteratively reweighted least squares fitting is implemented in a similar way as in KinGUII and CAKE (see below). Simply add the argument reweight = "obs" to your call to mkinfit and a separate variance componenent for each of the observed variables will be optimised in a second stage after the primary optimisation algorithm has converged.
  • -
  • When a metabolite decline phase is not described well by SFO kinetics, either IORE kinetics (often producing failures of the integration algorithm) or SFORB kinetics (working nicely) can be used for the metabolite, adding one respectively two parameters to the system.
  • +
  • When a metabolite decline phase is not described well by SFO kinetics, SFORB kinetics can be used for the metabolite.
@@ -112,10 +108,10 @@ install_github("jranke/mkin", quick = TRUE)

Credits and historical remarks

-

mkin would not be possible without the underlying software stack consisting of R and the packages deSolve, minpack.lm and FME, to say the least.

+

mkin would not be possible without the underlying software stack consisting of R and the packages deSolve and FME, to say the least.

It 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 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 was started in 2008 and first published on CRAN on 01 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, amongst 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.

diff --git a/README.md b/README.md index 561d1f5e..469fbb96 100644 --- a/README.md +++ b/README.md @@ -12,22 +12,10 @@ if several compartments are involved. You can install the latest released version from [CRAN](http://cran.r-project.org/package=mkin) from within R: - ```r install.packages("mkin") ``` -If looking for the latest features, you can install directly from -[github](http://github.com/jranke/mkin), e.g. using the `devtools` package. -Using `quick = TRUE` skips docs, multiple-architecture builds, demos, and -vignettes, to make installation as fast and painless as possible. - - -```r -require(devtools) -install_github("jranke/mkin", quick = TRUE) -``` - ## Background In the regulatory evaluation of chemical substances like plant protection @@ -60,7 +48,7 @@ maintained at the R-Forge project site. two latent state variables for the observed variable. * As of version 0.9-39, fitting of several models to several datasets, optionally in parallel, is supported, see for example - [`plot.mmkin`](http://kinfit.r-forge.r-project.org/mkin_static/plot.mmkin.html) + [`plot.mmkin`](http://kinfit.r-forge.r-project.org/mkin_static/plot.mmkin.html). * Model solution (forward modelling) in the function [`mkinpredict`](http://kinfit.r-forge.r-project.org/mkin_static/mkinpredict.html) is performed either using the analytical solution for the case of @@ -73,10 +61,6 @@ maintained at the R-Forge project site. The autogeneration of C code was inspired by the [`ccSolve`](https://github.com/karlines/ccSolve) package. Thanks to Karline Soetaert for her work on that. -* Model optimisation with - [`mkinfit`](http://kinfit.r-forge.r-project.org/mkin_static/mkinfit.html) - internally using the `modFit` function from the `FME` package, - but using the Port routine `nlminb` per default. * By default, kinetic rate constants and kinetic formation fractions are transformed internally using [`transform_odeparms`](http://kinfit.r-forge.r-project.org/mkin_static/transform_odeparms.html) @@ -104,9 +88,7 @@ maintained at the R-Forge project site. componenent for each of the observed variables will be optimised in a second stage after the primary optimisation algorithm has converged. * When a metabolite decline phase is not described well by SFO kinetics, - either IORE kinetics (often producing failures of the integration algorithm) - or SFORB kinetics (working nicely) can be used for the metabolite, adding one - respectively two parameters to the system. + SFORB kinetics can be used for the metabolite. ## GUI @@ -122,9 +104,8 @@ and one for the [github master branch](https://github.com/jranke/mkin/blob/maste ## Credits and historical remarks `mkin` would not be possible without the underlying software stack consisting -of R and the packages [deSolve](http://cran.r-project.org/package=deSolve), -[minpack.lm](http://cran.r-project.org/package=minpack.lm) and -[FME](http://cran.r-project.org/package=FME), to say the least. +of R and the packages [deSolve](http://cran.r-project.org/package=deSolve) +and [FME](http://cran.r-project.org/package=FME), to say the least. It could not have been written without me being introduced to regulatory fate modelling of pesticides by Adrian Gurney during my time at Harlan Laboratories @@ -138,7 +119,7 @@ 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](http://kinfit.r-forge.r-project.org/kinfit_static/index.html) was +[kinfit](http://kinfit.r-forge.r-project.org/kinfit_static/index.html) (now deprecated) was [started in 2008](https://r-forge.r-project.org/scm/viewvc.php?view=rev&root=kinfit&revision=2) and [first published](http://cran.r-project.org/src/contrib/Archive/kinfit/) on CRAN on 01 May 2010. -- cgit v1.2.1