From c58ccd73951b2000a7a254fb36bbd9f0733db6cd Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 12 May 2025 22:16:10 +0200 Subject: Check and test locally --- docs/articles/mkin.html | 212 +++++++++++++++++++++++++----------------------- 1 file changed, 112 insertions(+), 100 deletions(-) (limited to 'docs/articles/mkin.html') diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index fcf37ee4..10239ccb 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -1,5 +1,18 @@ -Short introduction to mkin • mkin + + + + + + +Short introduction to mkin • mkin + + + + + + + Skip to contents @@ -7,7 +20,7 @@ mkin - 1.2.9 + 1.2.10 + + @@ -64,7 +84,7 @@ Ranke

Last change 18 May 2023 -(rebuilt 2025-02-13)

+(rebuilt 2025-05-12) Source: vignettes/mkin.rmd
mkin.rmd
@@ -72,11 +92,12 @@ Ranke -

Wissenschaftlicher Berater, Kronacher -Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the +

Wissenschaftlicher Berater, Kronacher +Str. 12, 79639 Grenzach-Wyhlen, Germany
Privatdozent at the University of Freiburg

-
-

Abstract

+
+

Abstract +

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 @@ -86,38 +107,40 @@ nonlinear optimisation. The R add-on package this guidance from within R and calculates some statistical measures for data series within one or more compartments, for parent and metabolites.

-
library("mkin", quietly = TRUE)
-# Define the kinetic model
-m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
-                         M1 = mkinsub("SFO", "M2"),
-                         M2 = mkinsub("SFO"),
-                         use_of_ff = "max", quiet = TRUE)
-
-
-# Produce model predictions using some arbitrary parameters
-sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
-d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO,
-  c(k_parent = 0.03,
-    f_parent_to_M1 = 0.5, k_M1 = log(2)/100,
-    f_M1_to_M2 = 0.9, k_M2 = log(2)/50),
-  c(parent = 100, M1 = 0, M2 = 0),
-  sampling_times)
-
-# Generate a dataset by adding normally distributed errors with
-# standard deviation 3, for two replicates at each sampling time
-d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2,
-                             sdfunc = function(x) 3,
-                             n = 1, seed = 123456789 )
-
-# Fit the model to the dataset
-f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE)
-
-# Plot the results separately for parent and metabolites
-plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright"))
-

+
+library("mkin", quietly = TRUE)
+# Define the kinetic model
+m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
+                         M1 = mkinsub("SFO", "M2"),
+                         M2 = mkinsub("SFO"),
+                         use_of_ff = "max", quiet = TRUE)
+
+
+# Produce model predictions using some arbitrary parameters
+sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
+d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO,
+  c(k_parent = 0.03,
+    f_parent_to_M1 = 0.5, k_M1 = log(2)/100,
+    f_M1_to_M2 = 0.9, k_M2 = log(2)/50),
+  c(parent = 100, M1 = 0, M2 = 0),
+  sampling_times)
+
+# Generate a dataset by adding normally distributed errors with
+# standard deviation 3, for two replicates at each sampling time
+d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2,
+                             sdfunc = function(x) 3,
+                             n = 1, seed = 123456789 )
+
+# Fit the model to the dataset
+f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE)
+
+# Plot the results separately for parent and metabolites
+plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright"))
+

-
-

Background

+
+

Background +

The mkin package (J. Ranke 2021) implements the approach to degradation kinetics recommended in the kinetics report provided by the FOrum for Co-ordination of @@ -138,8 +161,7 @@ purpose compartment based tool providing infrastructure for fitting dynamic simulation models based on differential equations to data.

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 e.g. the +imported into the R-Forge site (see e.g. the initial commit on 11 May 2010), where the code is still being updated.

At that time, the R package FME (Flexible Modelling @@ -162,8 +184,9 @@ times.

The possibility to specify back-reactions and a biphasic model (SFORB) for metabolites were present in mkin from the very beginning.

-
-

Derived software tools

+
+

Derived software tools +

Soon after the publication of mkin, two derived tools were published, namely KinGUII (developed at Bayer Crop Science) and CAKE (commissioned to Tessella by Syngenta), which added a graphical @@ -184,50 +207,44 @@ be specified for transformation products. Starting with KinGUII version KinGUII.

A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named -gmkin. Please see its documentation page and manual +gmkin. Please see its documentation page and manual for further information.

A comparison of scope, usability and numerical results obtained with -these tools has been recently been published by Johannes Ranke, Wöltjen, and Meinecke +these tools has been recently been published by Johannes Ranke, Wöltjen, and Meinecke (2018).

-
-

Unique features

+
+

Unique features +

Currently, the main unique features available in mkin are

The iteratively reweighted least squares fitting of different variances for each variable as introduced by Gao -et al. (2011) has been available in mkin since version -0.9-22. With release +et al. (2011) has been available in mkin since version +0.9-22. With release 0.9.49.5, 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 -two-component +two-component error model inspired by error models developed in analytical chemistry (Johannes Ranke and Meinecke 2019).

-
-

Internal parameter transformations

+
+

Internal parameter transformations +

For rate constants, the log transformation is used, as proposed by Bates and Watts (1988, 77, 149). Approximate intervals are constructed for the transformed rate constants @@ -252,9 +269,9 @@ 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.

-
-

Confidence intervals based on transformed parameters

+
+

Confidence intervals based on transformed parameters +

In the first attempt at providing improved parameter confidence intervals introduced to mkin in 2013, confidence intervals obtained from FME on the transformed parameters were simply all @@ -276,14 +293,13 @@ 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.

-
-

Parameter t-test based on untransformed parameters

+
+

Parameter t-test based on untransformed parameters +

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 (FOCUS Work Group on Degradation Kinetics 2014, +validity of rate constants in the FOCUS guidance (FOCUS Work Group on Degradation Kinetics 2014, 96ff).

It has been argued that the precondition for this test, i.e. normal distribution of the estimator for the parameters, is not @@ -304,8 +320,9 @@ t-test is based on the unjustified assumption of normal distribution of the parameter estimators.

-
-

References

+
+

References +

@@ -316,14 +333,12 @@ Applications. Wiley-Interscience. FOCUS Work Group on Degradation Kinetics. 2006. 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. http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics. +on Degradation Kinetics. http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics.
———. 2014. Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU -Registration. 1.1 ed. http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics. +Registration. 1.1 ed. http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics.
Gao, Z., J. W. Green, J. Vanderborght, and W. Schmitt. 2011. @@ -333,34 +348,29 @@ Science and Technology 45: 4429–37.
Ranke, J. 2021. mkin‘: -Kinetic Evaluation of Chemical Degradation Data. https://CRAN.R-project.org/package=mkin. +Kinetic Evaluation of Chemical Degradation Data. https://CRAN.R-project.org/package=mkin.
Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In SETAC World 20-24 -May. Berlin. https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf. +May. Berlin. https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf.
———. 2015. “To t-Test or Not to t-Test, That Is the Question.” In XV Symposium on Pesticide Chemistry 2-4 -September 2015. Piacenza. https://jrwb.de/posters/piacenza_2015.pdf. +September 2015. Piacenza. https://jrwb.de/posters/piacenza_2015.pdf.
Ranke, Johannes, and Stefan Meinecke. 2019. “Error Models for the Kinetic Evaluation of Chemical Degradation Data.” -Environments 6 (12). https://doi.org/10.3390/environments6120124. +Environments 6 (12). https://doi.org/10.3390/environments6120124.
Ranke, Johannes, Janina Wöltjen, and Stefan Meinecke. 2018. “Comparison of Software Tools for Kinetic Evaluation of Chemical Degradation Data.” Environmental Sciences Europe 30 (1): -17. https://doi.org/10.1186/s12302-018-0145-1. +17. https://doi.org/10.1186/s12302-018-0145-1.
Schäfer, D., B. Mikolasch, P. Rainbird, and B. Harvey. 2007. @@ -374,13 +384,13 @@ Piacenza. Soetaert, Karline, and Thomas Petzoldt. 2010. “Inverse Modelling, Sensitivity and Monte Carlo Analysis in R Using Package FME.” Journal of Statistical Software 33 -(3): 1–28. https://doi.org/10.18637/jss.v033.i03. +(3): 1–28. https://doi.org/10.18637/jss.v033.i03.
+ +
@@ -392,10 +402,12 @@ href="https://doi.org/10.18637/jss.v033.i03">https://doi.org/10.18637/jss.v033.i

Site built with pkgdown 2.1.1.

-
+ +
- + + -- cgit v1.2.1