From b9be19af5e3085216d0cd5af439332f631fa8b92 Mon Sep 17 00:00:00 2001
From: Johannes Ranke  A comprehensive report of the results is obtained using the  Here, the DFOP model is clearly the best-fit model for dataset L2 based on the chi^2 error level criterion. However, the failure to calculate the covariance matrix indicates that the parameter estimates correlate excessively. Therefore, the FOMC model may be preferred for this dataset. We can extract the summary and plot for e.g. the DFOP fit, using square brackets for indexing which will result in the use of the summary and plot functions working on mkinfit objects. The \(\chi^2\) error level of 3.3% as well as the plot suggest that the SFO model fits very well. The error level at which the \(\chi^2\) test passes is slightly lower for the FOMC model. However, the difference appears negligible. Ranke, Johannes. 2014. “Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.” Umweltbundesamt Projektnummer 27452. Many approaches are possible regarding the evaluation of chemical degradation data. The  The  When the first  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 e.g. the initial commit on 11 May 2010), where the code is still occasionally updated. At that time, the R package  Also,  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 initial commit on 11 May 2010), where the code is still being updated. At that time, the R package  Also,  The possibility to specify back-reactions and a biphasic model (SFORB) for metabolites were present in  Soon after the publication of  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. Soon after the publication of  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). 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. A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named  A comparison of scope, usability and numerical results obtained with these tools has been recently been published by Ranke, Wöltjen, and Meinecke (2018). Currently (July 2019), the main features available in  In addition, the possibility to use two alternative error models to constant variance have been integrated. The variance by variable error model introduced by Gao et al. (2011) has been available via an iteratively reweighted least squares (IRLS) procedure since mkin version 0.9-22. With release 0.9.49.5, 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 two-component error model inspired by error models developed in analytical chemistry. Currently, the main unique features available in  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 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 error model inspired by error models developed in analytical chemistry (Ranke and Meinecke 2019). 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 (compare Bates and Watts 1988, 135), i.e. for their logarithms. Confidence intervals for the rate constants are then obtained using the appropriate backtransformation using the exponential function. In the first version of  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. In 2012, an alternative reparameterisation of the formation fractions was proposed together with René Lehmann (Ranke and Lehmann 2012), 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 2012, an alternative reparameterisation of the formation fractions was proposed together with René Lehmann (Ranke and Lehmann 2012), 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. In the first attempt at providing improved parameter confidence intervals introduced to  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. 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. 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. 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. Bates, D., and D. Watts. 1988. Nonlinear Regression and Its 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. 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. ———. 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. ———. 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. Gao, Z., J.W. Green, J. Vanderborght, and W. Schmitt. 2011. “Improving Uncertainty Analysis in Kinetic Evaluations Using Iteratively Reweighted Least Squares.” Journal. Environmental Science and Technology 45: 4429–37. Gao, Z., J. W. Green, J. Vanderborght, and W. Schmitt. 2011. “Improving Uncertainty Analysis in Kinetic Evaluations Using Iteratively Reweighted Least Squares.” Journal. Environmental Science and Technology 45: 4429–37. Ranke, J. 2019. ‘mkin‘: Kinetic Evaluation of Chemical Degradation Data. https://CRAN.R-project.org/package=mkin. Ranke, J. 2021. ‘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. ———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In XV Symposium on Pesticide Chemistry 2-4 September 2015. Piacenza. http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.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. http://chem.uft.uni-bremen.de/ranke/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. 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. 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. 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 Proceedings of the Xiii Symposium Pesticide Chemistry, edited by Del Re A. A. M., Capri E., Fragoulis G., and Trevisan M., 916–23. 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://www.jstatsoft.org/v33/i03/. 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://www.jstatsoft.org/v33/i03/. Note that a method for calculating maximum moving window time weighted average concentrations for a model fitted by ‘mkinfit’ or from parent decline model parameters is included in the  FOCUS Work Group on 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. FOCUS Work Group on 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. This fit corresponds to the final result chosen in Appendix 7 of the FOCUS report. Confidence intervals returned by mkin are based on internally transformed parameters, however. It is clear the degradation rate of Z3 towards the end of the experiment is very low as DT50_Z3_b2 (the second Eigenvalue of the system of two differential equations representing the SFORB system for Z3, corresponding to the slower rate constant of the DFOP model) is reported to be infinity. However, this appears to be a feature of the data. FOCUS Work Group on 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. FOCUS Work Group on 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.    In this case, the DFOP fit reported for PestDF resulted in a negative value for the slower rate constant, which is not possible in mkin. The other results are in agreement.        US EPA. 2015. “Standard Operating Procedure for Using the NAFTA Guidance to Calculate Representative Half-Life Values and Characterizing Pesticide Degradation.” Two metabolites, synthetic data: Constant variance (t6 and t7), two-component error model (t8 and t9), and variance by variable (t10 and t11) for one model fitted to one dataset, i.e. one fit for each test. Constant variance (t6 and t7), two-component error model (t8 and t9), and variance by variable (t10 and t11) for one model fitted to one dataset, i.e. one fit for each test. We see that using the compiled model is by more than a factor of 10 faster than using deSolve without compiled code. Here we get a performance benefit of a factor of 30 using the version of the differential equation model compiled from C code! This vignette was built with mkin 0.9.50.4 on Here we get a performance benefit of a factor of 29 using the version of the differential equation model compiled from C code! This vignette was built with mkin 1.0.3.9000 on There is a ChangeLog, for the latest CRAN release and one for the github master branch. There is a list of changes for the latest CRAN release and one for each github branch, e.g. the main branch. In 2011, Bayer Crop Science started to distribute an R based successor to KinGUI named KinGUII whose R code is based on  Somewhat in parallel, Syngenta has sponsored the development of an  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 ‘saem’: generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods
 
Example evaluation of FOCUS Example Dataset D
                         Johannes Ranke
             
-            2020-11-30
+            Last change 31 January 2019 (rebuilt 2021-02-15)
       
       Source: vignettes/FOCUS_D.rmd
       FOCUS_D.rmdsummary method for mkinfit objects.
 
summary(fit)## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:50 2020 
-## Date of summary: Mon Nov 30 16:01:50 2020 
+## Date of fit:     Mon Feb 15 17:13:36 2021 
+## Date of summary: Mon Feb 15 17:13:37 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -241,11 +240,11 @@
 ## 
 ## Parameter correlation:
 ##                   parent_0 log_k_parent   log_k_m1 f_parent_qlogis      sigma
-## parent_0         1.000e+00    5.174e-01 -1.688e-01      -5.471e-01 -1.171e-06
-## log_k_parent     5.174e-01    1.000e+00 -3.263e-01      -5.426e-01 -8.481e-07
-## log_k_m1        -1.688e-01   -3.263e-01  1.000e+00       7.478e-01  8.209e-07
+## parent_0         1.000e+00    5.174e-01 -1.688e-01      -5.471e-01 -1.172e-06
+## log_k_parent     5.174e-01    1.000e+00 -3.263e-01      -5.426e-01 -8.483e-07
+## log_k_m1        -1.688e-01   -3.263e-01  1.000e+00       7.478e-01  8.205e-07
 ## f_parent_qlogis -5.471e-01   -5.426e-01  7.478e-01       1.000e+00  1.305e-06
-## sigma           -1.171e-06   -8.481e-07  8.209e-07       1.305e-06  1.000e+00
+## sigma           -1.172e-06   -8.483e-07  8.205e-07       1.305e-06  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
diff --git a/docs/dev/articles/FOCUS_D_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/dev/articles/FOCUS_D_files/accessible-code-block-0.0.1/empty-anchor.js
new file mode 100644
index 00000000..ca349fd6
--- /dev/null
+++ b/docs/dev/articles/FOCUS_D_files/accessible-code-block-0.0.1/empty-anchor.js
@@ -0,0 +1,15 @@
+// Hide empty  tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
+// v0.0.1
+// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.
+
+document.addEventListener('DOMContentLoaded', function() {
+  const codeList = document.getElementsByClassName("sourceCode");
+  for (var i = 0; i < codeList.length; i++) {
+    var linkList = codeList[i].getElementsByTagName('a');
+    for (var j = 0; j < linkList.length; j++) {
+      if (linkList[j].innerHTML === "") {
+        linkList[j].setAttribute('aria-hidden', 'true');
+      }
+    }
+  }
+});
diff --git a/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png b/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png
index 8ddca415..abf26715 100644
Binary files a/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png and b/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png differ
diff --git a/docs/dev/articles/FOCUS_D_files/header-attrs-2.6/header-attrs.js b/docs/dev/articles/FOCUS_D_files/header-attrs-2.6/header-attrs.js
new file mode 100644
index 00000000..dd57d92e
--- /dev/null
+++ b/docs/dev/articles/FOCUS_D_files/header-attrs-2.6/header-attrs.js
@@ -0,0 +1,12 @@
+// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
+// be compatible with the behavior of Pandoc < 2.8).
+document.addEventListener('DOMContentLoaded', function(e) {
+  var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
+  var i, h, a;
+  for (i = 0; i < hs.length; i++) {
+    h = hs[i];
+    if (!/^h[1-6]$/i.test(h.tagName)) continue;  // it should be a header h1-h6
+    a = h.attributes;
+    while (a.length > 0) h.removeAttribute(a[0].name);
+  }
+});
diff --git a/docs/dev/articles/FOCUS_L.html b/docs/dev/articles/FOCUS_L.html
index 2695db5e..547ec630 100644
--- a/docs/dev/articles/FOCUS_L.html
+++ b/docs/dev/articles/FOCUS_L.html
@@ -32,7 +32,7 @@
       
       
         mkin
-        0.9.50.4
+        1.0.3.9000
       
     
 
Example evaluation of FOCUS Laboratory Data L1 to L3
                         Johannes Ranke
             
-            2020-11-30
+            Last change 17 November 2016 (rebuilt 2021-02-15)
       
       Source: vignettes/FOCUS_L.rmd
       FOCUS_L.rmd## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:52 2020 
-## Date of summary: Mon Nov 30 16:01:52 2020 
+## Date of fit:     Mon Feb 15 17:13:39 2021 
+## Date of summary: Mon Feb 15 17:13:39 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -234,17 +233,17 @@
 ## Warning in sqrt(1/diag(V)): NaNs produced
-## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
 ## doubtful## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:53 2020 
-## Date of summary: Mon Nov 30 16:01:53 2020 
+## Date of fit:     Mon Feb 15 17:13:40 2021 
+## Date of summary: Mon Feb 15 17:13:40 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 380 model solutions performed in 0.087 s
+## Fitted using 369 model solutions performed in 0.084 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -272,22 +271,22 @@
 ## 
 ## Results:
 ## 
-##        AIC      BIC    logLik
-##   95.88778 99.44927 -43.94389
+##        AIC      BIC   logLik
+##   95.88781 99.44929 -43.9439
 ## 
 ## Optimised, transformed parameters with symmetric confidence intervals:
 ##           Estimate Std. Error  Lower  Upper
 ## parent_0     92.47     1.2820 89.720 95.220
-## log_alpha    16.92        NaN    NaN    NaN
-## log_beta     19.26        NaN    NaN    NaN
-## sigma         2.78     0.4501  1.814  3.745
+## log_alpha    13.78        NaN    NaN    NaN
+## log_beta     16.13        NaN    NaN    NaN
+## sigma         2.78     0.4598  1.794  3.766
 ## 
 ## Parameter correlation:
-##           parent_0 log_alpha log_beta    sigma
-## parent_0  1.000000       NaN      NaN 0.002218
-## log_alpha      NaN         1      NaN      NaN
-## log_beta       NaN       NaN        1      NaN
-## sigma     0.002218       NaN      NaN 1.000000
+##            parent_0 log_alpha log_beta     sigma
+## parent_0  1.0000000       NaN      NaN 0.0001671
+## log_alpha       NaN         1      NaN       NaN
+## log_beta        NaN       NaN        1       NaN
+## sigma     0.0001671       NaN      NaN 1.0000000
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -295,9 +294,9 @@
 ## for estimators of untransformed parameters.
 ##           Estimate t value Pr(>t)  Lower  Upper
 ## parent_0 9.247e+01      NA     NA 89.720 95.220
-## alpha    2.223e+07      NA     NA     NA     NA
-## beta     2.325e+08      NA     NA     NA     NA
-## sigma    2.780e+00      NA     NA  1.814  3.745
+## alpha    9.658e+05      NA     NA     NA     NA
+## beta     1.010e+07      NA     NA     NA     NA
+## sigma    2.780e+00      NA     NA  1.794  3.766
 ## 
 ## FOCUS Chi2 error levels in percent:
 ##          err.min n.optim df
@@ -346,10 +345,10 @@
 
 
summary(m.L2.FOMC, data = FALSE)## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:54 2020 
-## Date of summary: Mon Nov 30 16:01:54 2020 
+## Date of fit:     Mon Feb 15 17:13:40 2021 
+## Date of summary: Mon Feb 15 17:13:40 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
@@ -391,10 +390,10 @@
 ## 
 ## Parameter correlation:
 ##             parent_0  log_alpha   log_beta      sigma
-## parent_0   1.000e+00 -1.151e-01 -2.085e-01 -7.436e-09
-## log_alpha -1.151e-01  1.000e+00  9.741e-01 -1.617e-07
-## log_beta  -2.085e-01  9.741e-01  1.000e+00 -1.386e-07
-## sigma     -7.436e-09 -1.617e-07 -1.386e-07  1.000e+00
+## parent_0   1.000e+00 -1.151e-01 -2.085e-01 -7.828e-09
+## log_alpha -1.151e-01  1.000e+00  9.741e-01 -1.602e-07
+## log_beta  -2.085e-01  9.741e-01  1.000e+00 -1.372e-07
+## sigma     -7.828e-09 -1.602e-07 -1.372e-07  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -427,10 +426,10 @@
 
 
summary(m.L2.DFOP, data = FALSE)## mkin version used for fitting:    0.9.50.4 
+
+## parent 0.5335 5.311    1.599 0.03084   2.058## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:54 2020 
-## Date of summary: Mon Nov 30 16:01:54 2020 
+## Date of fit:     Mon Feb 15 17:13:41 2021 
+## Date of summary: Mon Feb 15 17:13:41 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -439,7 +438,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 581 model solutions performed in 0.136 s
+## Fitted using 581 model solutions performed in 0.134 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -470,18 +469,18 @@
 ## Optimised, transformed parameters with symmetric confidence intervals:
 ##          Estimate Std. Error      Lower     Upper
 ## parent_0   93.950  9.998e-01    91.5900   96.3100
-## log_k1      3.117  1.929e+03 -4558.0000 4564.0000
+## log_k1      3.112  1.842e+03 -4353.0000 4359.0000
 ## log_k2     -1.088  6.285e-02    -1.2370   -0.9394
 ## g_qlogis   -0.399  9.946e-02    -0.6342   -0.1638
 ## sigma       1.414  2.886e-01     0.7314    2.0960
 ## 
 ## Parameter correlation:
-##           parent_0     log_k1     log_k2   g_qlogis      sigma
-## parent_0 1.000e+00  6.459e-07  9.147e-11  2.665e-01  8.413e-11
-## log_k1   6.459e-07  1.000e+00  1.061e-04 -2.087e-04 -9.802e-06
-## log_k2   9.147e-11  1.061e-04  1.000e+00 -7.903e-01 -2.429e-09
-## g_qlogis 2.665e-01 -2.087e-04 -7.903e-01  1.000e+00  4.049e-09
-## sigma    8.413e-11 -9.802e-06 -2.429e-09  4.049e-09  1.000e+00
+##            parent_0     log_k1     log_k2   g_qlogis      sigma
+## parent_0  1.000e+00  6.783e-07 -3.390e-10  2.665e-01 -2.967e-10
+## log_k1    6.783e-07  1.000e+00  1.116e-04 -2.196e-04 -1.031e-05
+## log_k2   -3.390e-10  1.116e-04  1.000e+00 -7.903e-01  2.917e-09
+## g_qlogis  2.665e-01 -2.196e-04 -7.903e-01  1.000e+00 -4.408e-09
+## sigma    -2.967e-10 -1.031e-05  2.917e-09 -4.408e-09  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -489,7 +488,7 @@
 ## for estimators of untransformed parameters.
 ##          Estimate   t value    Pr(>t)   Lower   Upper
 ## parent_0  93.9500 9.397e+01 2.036e-12 91.5900 96.3100
-## k1        22.5800 5.303e-04 4.998e-01  0.0000     Inf
+## k1        22.4800 5.553e-04 4.998e-01  0.0000     Inf
 ## k2         0.3369 1.591e+01 4.697e-07  0.2904  0.3909
 ## g          0.4016 1.680e+01 3.238e-07  0.3466  0.4591
 ## sigma      1.4140 4.899e+00 8.776e-04  0.7314  2.0960
@@ -501,7 +500,7 @@
 ## 
 ## Estimated disappearance times:
 ##          DT50  DT90 DT50back DT50_k1 DT50_k2
-## parent 0.5335 5.311    1.599  0.0307   2.058
 
summary(mm.L3[["DFOP", 1]])## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:55 2020 
-## Date of summary: Mon Nov 30 16:01:55 2020 
+## Date of fit:     Mon Feb 15 17:13:41 2021 
+## Date of summary: Mon Feb 15 17:13:42 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -545,7 +544,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 376 model solutions performed in 0.081 s
+## Fitted using 376 model solutions performed in 0.082 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -583,11 +582,11 @@
 ## 
 ## Parameter correlation:
 ##            parent_0     log_k1     log_k2   g_qlogis      sigma
-## parent_0  1.000e+00  1.732e-01  2.282e-02  4.009e-01 -9.671e-08
-## log_k1    1.732e-01  1.000e+00  4.945e-01 -5.809e-01  7.148e-07
+## parent_0  1.000e+00  1.732e-01  2.282e-02  4.009e-01 -9.664e-08
+## log_k1    1.732e-01  1.000e+00  4.945e-01 -5.809e-01  7.147e-07
 ## log_k2    2.282e-02  4.945e-01  1.000e+00 -6.812e-01  1.022e-06
-## g_qlogis  4.009e-01 -5.809e-01 -6.812e-01  1.000e+00 -7.929e-07
-## sigma    -9.671e-08  7.148e-07  1.022e-06 -7.929e-07  1.000e+00
+## g_qlogis  4.009e-01 -5.809e-01 -6.812e-01  1.000e+00 -7.926e-07
+## sigma    -9.664e-08  7.147e-07  1.022e-06 -7.926e-07  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -646,10 +645,10 @@
 
 
summary(mm.L4[["SFO", 1]], data = FALSE)## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:55 2020 
-## Date of summary: Mon Nov 30 16:01:55 2020 
+## Date of fit:     Mon Feb 15 17:13:42 2021 
+## Date of summary: Mon Feb 15 17:13:42 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -711,17 +710,17 @@
 ## parent  106  352
 
summary(mm.L4[["FOMC", 1]], data = FALSE)## mkin version used for fitting:    0.9.50.4 
+## mkin version used for fitting:    1.0.3.9000 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Mon Nov 30 16:01:55 2020 
-## Date of summary: Mon Nov 30 16:01:56 2020 
+## Date of fit:     Mon Feb 15 17:13:42 2021 
+## Date of summary: Mon Feb 15 17:13:42 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 224 model solutions performed in 0.045 s
+## Fitted using 224 model solutions performed in 0.046 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -756,10 +755,10 @@
 ## 
 ## Parameter correlation:
 ##             parent_0  log_alpha   log_beta      sigma
-## parent_0   1.000e+00 -4.696e-01 -5.543e-01 -2.456e-07
-## log_alpha -4.696e-01  1.000e+00  9.889e-01  2.169e-08
-## log_beta  -5.543e-01  9.889e-01  1.000e+00  4.910e-08
-## sigma     -2.456e-07  2.169e-08  4.910e-08  1.000e+00
+## parent_0   1.000e+00 -4.696e-01 -5.543e-01 -2.468e-07
+## log_alpha -4.696e-01  1.000e+00  9.889e-01  2.478e-08
+## log_beta  -5.543e-01  9.889e-01  1.000e+00  5.211e-08
+## sigma     -2.468e-07  2.478e-08  5.211e-08  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -783,7 +782,7 @@
 
 References
-
 
Introduction to mkin
                         Johannes Ranke
             
-            2020-11-30
+            Last change 15 February 2021 (rebuilt 2021-02-15)
       
       Source: vignettes/mkin.rmd
       mkin.rmd
 Background
-mkin package (Ranke 2019) implements the approach recommended in the kinetics report provided by the FOrum for Co-ordination of pesticide fate models and their USe (FOCUS Work Group on Degradation Kinetics 2006, 2014) 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.mkin package (Ranke 2021) 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 (FOCUS Work Group on Degradation Kinetics 2006, 2014). 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.mkin code was published in 2010, the most commonly used tools for fitting more complex kinetic degradation models to experimental data were KinGUI (Schäfer et al. 2007), 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.FME (Flexible Modelling Environment) (Soetaert and Petzoldt 2010) 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 \(\chi^2\) goodness-of-fit test as defined by the FOCUS kinetics workgroup would pass using an significance level \(\alpha\) of 0.05. This relative error, expressed as a percentage, is often termed \(\chi^2\) error level or similar.mkin introduced using analytical solutions for parent only kinetics for improved optimization speed. Later, Eigenvalue based solutions were introduced to mkin for the case of linear differential equations (i.e. 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.FME (Flexible Modelling Environment) (Soetaert and Petzoldt 2010) 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 \(\chi^2\) error level as defined in this guidance.mkin introduced using analytical solutions for parent only kinetics for improved optimization speed. Later, Eigenvalue based solutions were introduced to mkin for the case of linear differential equations (i.e. 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.mkin from the very beginning.
 Derived software tools
-mkin, 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.mkin, 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.gmkin. Please see its documentation page and manual for further information.
-Recent developments
-mkin 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 mmkin function, and the estimation of parameter confidence intervals based on transformed parameters.
+Unique features
+mkin are
+
+mmkin function,
@@ -179,13 +184,13 @@
 
mkin 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.
 Confidence intervals based on transformed parameters
 mkin 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.
 References
 
-
 
Calculation of time weighted average concentrations with mkin
                         Johannes Ranke
             
-            2020-11-30
+            Last change 18 September 2019 (rebuilt 2021-02-15)
       
       Source: vignettes/twa.rmd
       twa.rmdmax_twa_parent() function. If the same is needed for metabolites, the function pfm::max_twa() from the ‘pfm’ package can be used.
 
Example evaluation of FOCUS dataset Z
                         Johannes Ranke
             
-            2020-11-30
+            Last change 16 January 2018 (rebuilt 2021-02-15)
       
       Source: vignettes/web_only/FOCUS_Z.rmd
       FOCUS_Z.rmd
 
summary(m.Z.FOCUS, data = FALSE)$bpar##             Estimate se_notrans t value     Pr(>t)     Lower      Upper
-## Z0_0       96.839001   1.994273 48.5585 4.0276e-42 92.827060 100.850943
-## k_Z0        2.215367   0.118456 18.7021 1.0410e-23  1.989432   2.466960
-## k_Z1        0.478310   0.028258 16.9265 6.2430e-22  0.424712   0.538673
-## k_Z2        0.451628   0.042139 10.7176 1.6313e-14  0.374337   0.544877
-## k_Z3        0.058692   0.015245  3.8498 1.7806e-04  0.034806   0.098972
-## f_Z2_to_Z3  0.471498   0.058350  8.0805 9.6614e-11  0.357741   0.588294
+## Z0_0       96.838822   1.994274 48.5584 4.0280e-42 92.826981 100.850664
+## k_Z0        2.215393   0.118458 18.7019 1.0413e-23  1.989456   2.466989
+## k_Z1        0.478305   0.028258 16.9266 6.2418e-22  0.424708   0.538666
+## k_Z2        0.451627   0.042139 10.7176 1.6314e-14  0.374339   0.544872
+## k_Z3        0.058692   0.015245  3.8499 1.7803e-04  0.034808   0.098965
+## f_Z2_to_Z3  0.471502   0.058351  8.0805 9.6608e-11  0.357769   0.588274
 ## sigma       3.984431   0.383402 10.3923 4.5575e-14  3.213126   4.755736
 
endpoints(m.Z.FOCUS)
 References
 
-
 
Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance
                         Johannes Ranke
             
-            2020-11-30
+            26 February 2019 (rebuilt 2021-02-15)
       
       Source: vignettes/web_only/NAFTA_examples.rmd
       NAFTA_examples.rmd
 
p9b <- nafta(NAFTA_SOP_Attachment[["p9b"]])
+## Warning in sqrt(diag(covar)): NaNs produced## Warning in sqrt(diag(covar_notrans)): NaNs produced## Warning in sqrt(1/diag(V)): NaNs produced## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
 ## doubtful## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
   
 
plot(p9b)
+
 
print(p9b)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -475,12 +475,12 @@
 ## sigma             1.288 1.76e-04  0.7456  1.830
 ## 
 ## $DFOP
-##          Estimate Pr(>t)   Lower   Upper
-## parent_0  94.7123     NA 93.1355 96.2891
-## k1         0.0389     NA  0.0266  0.0569
-## k2         0.0389     NA  0.0255  0.0592
-## g          0.5256     NA      NA      NA
-## sigma      1.5957     NA  0.9135  2.2779
+##          Estimate   Pr(>t)   Lower   Upper
+## parent_0  94.7123 1.61e-16 93.1355 96.2891
+## k1         0.0389 1.08e-04  0.0266  0.0569
+## k2         0.0389 2.23e-04  0.0255  0.0592
+## g          0.5256      NaN      NA      NA
+## sigma      1.5957 2.50e-04  0.9135  2.2779
 ## 
 ## 
 ## DTx values:
@@ -496,15 +496,18 @@
 
 Example on page 10
-
+
 
p10 <- nafta(NAFTA_SOP_Attachment[["p10"]])
+## Warning in sqrt(diag(covar_notrans)): NaNs produced
+## Warning in sqrt(diag(covar)): NaNs produced
+## Warning in sqrt(1/diag(V)): NaNs produced## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p10)
+
 
print(p10)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -530,9 +533,9 @@
 ## $DFOP
 ##          Estimate   Pr(>t)   Lower    Upper
 ## parent_0 101.7315 1.41e-09 91.6534 111.8097
-## k1         0.0495 5.63e-03  0.0240   0.1020
-## k2         0.0495 1.93e-03  0.0272   0.0903
-## g          0.4487      NaN  0.0000   1.0000
+## k1         0.0495 6.58e-03  0.0303   0.0809
+## k2         0.0495 2.60e-03  0.0410   0.0598
+## g          0.4487 5.00e-01      NA       NA
 ## sigma      8.0152 2.50e-04  4.5886  11.4418
 ## 
 ## 
@@ -553,14 +556,14 @@
 
 Example on page 11
-
+
 
p11 <- nafta(NAFTA_SOP_Attachment[["p11"]])## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p11)
+
 
 
print(p11)
+## [1] 41148170## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -596,10 +599,10 @@
 ##          DT50     DT90 DT50_rep
 ## SFO  2.16e+02 7.18e+02 2.16e+02
 ## IORE 9.73e+02 1.37e+08 4.11e+07
-## DFOP 3.07e+11 1.93e+12 6.97e+11
+## DFOP 3.07e+11 1.93e+12 6.98e+11
 ## 
 ## Representative half-life:
-## [1] 41148171
 Example on page 12, upper panel
-
+
 
p12a <- nafta(NAFTA_SOP_Attachment[["p12a"]])
+## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
-## matrix
-
-## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
 ## matrix
+## Warning in sqrt(diag(covar)): NaNs produced
+## Warning in sqrt(diag(covar_notrans)): NaNs produced
+## Warning in sqrt(1/diag(V)): NaNs produced## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p12a)
+
 
print(p12a)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -646,12 +651,12 @@
 ## sigma             3.965     NA    NA    NA
 ## 
 ## $DFOP
-##          Estimate   Pr(>t) Lower Upper
-## parent_0  100.521 2.74e-10    NA    NA
-## k1          0.124 2.53e-05    NA    NA
-## k2          0.124 2.52e-02    NA    NA
-## g           0.793 5.00e-01    NA    NA
-## sigma       7.048 2.50e-04    NA    NA
+##          Estimate   Pr(>t)   Lower   Upper
+## parent_0  100.521 2.74e-10 92.2366 108.805
+## k1          0.124 2.53e-05  0.0908   0.170
+## k2          0.124 2.52e-02  0.0456   0.339
+## g           0.793      NaN      NA      NA
+## sigma       7.048 2.50e-04  4.0349  10.061
 ## 
 ## 
 ## DTx values:
@@ -666,20 +671,18 @@
 
 Example on page 12, lower panel
-
+
 
p12b <- nafta(NAFTA_SOP_Attachment[["p12b"]])## Warning in sqrt(diag(covar)): NaNs produced## Warning in qt(alpha/2, rdf): NaNs produced
-## Warning in qt(1 - alpha/2, rdf): NaNs produced
-## Warning in sqrt(1/diag(V)): NaNs produced
+## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
-## doubtful
+## Warning in sqrt(diag(covar_notrans)): NaNs produced## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs produced## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p12b)
+
 
print(p12b)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -704,11 +707,11 @@
 ## 
 ## $DFOP
 ##          Estimate Pr(>t) Lower Upper
-## parent_0  97.6840     NA   NaN   NaN
-## k1         0.0589     NA    NA    NA
-## k2         0.0589     NA    NA    NA
-## g          0.6473     NA    NA    NA
-## sigma      3.4323     NA   NaN   NaN
+## parent_0  97.6840    NaN   NaN   NaN
+## k1         0.0589    NaN    NA    NA
+## k2         0.0589    NaN    NA    NA
+## g          0.6473    NaN    NA    NA
+## sigma      3.4323    NaN   NaN   NaN
 ## 
 ## 
 ## DTx values:
@@ -723,18 +726,14 @@
 
 Example on page 13
-
+
 
p13 <- nafta(NAFTA_SOP_Attachment[["p13"]])
-## Warning in sqrt(diag(covar)): NaNs produced
-## Warning in sqrt(1/diag(V)): NaNs produced## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
-## doubtful## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p13)
+
 
print(p13)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -760,9 +759,9 @@
 ## $DFOP
 ##          Estimate Pr(>t)    Lower    Upper
 ## parent_0 92.73500     NA 8.95e+01 95.92118
-## k1        0.00258     NA 4.25e-04  0.01569
-## k2        0.00258     NA 1.76e-03  0.00379
-## g         0.16452     NA       NA       NA
+## k1        0.00258     NA 4.14e-04  0.01611
+## k2        0.00258     NA 1.74e-03  0.00383
+## g         0.16452     NA 0.00e+00  1.00000
 ## sigma     3.41172     NA 2.02e+00  4.79960
 ## 
 ## 
@@ -779,7 +778,7 @@
 
 DT50 not observed in the study and DFOP problems in PestDF
-
+
 
 
p14 <- nafta(NAFTA_SOP_Attachment[["p14"]])## Warning in sqrt(diag(covar)): NaNs produced
@@ -787,10 +786,10 @@
 ## doubtful## Warning in sqrt(1/diag(V)): NaNs produced## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p14)
+
 
print(p14)
@@ -835,14 +834,14 @@
 ## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -817,7 +816,7 @@
 ##          Estimate   Pr(>t)    Lower    Upper
 ## parent_0 1.00e+02 2.96e-28 99.40280 101.2768
 ## k1       9.53e-03 1.20e-01  0.00638   0.0143
-## k2       5.33e-12 5.00e-01  0.00000      Inf
+## k2       6.08e-12 5.00e-01  0.00000      Inf
 ## g        3.98e-01 2.19e-01  0.30481   0.4998
 ## sigma    1.17e+00 7.68e-06  0.77406   1.5610
 ## 
@@ -826,7 +825,7 @@
 ##          DT50     DT90 DT50_rep
 ## SFO  2.48e+02 8.25e+02 2.48e+02
 ## IORE 4.34e+02 2.22e+04 6.70e+03
-## DFOP 3.48e+10 3.37e+11 1.30e+11
+## DFOP 3.05e+10 2.95e+11 1.14e+11
 ## 
 ## Representative half-life:
 ## [1] 6697.44
 N is less than 1 and DFOP fraction parameter is below zero
-
+
 
p15a <- nafta(NAFTA_SOP_Attachment[["p15a"]])## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p15a)
+
 
print(p15a)
-## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -866,12 +865,12 @@
 ## sigma             3.105 1.78e-04  1.795  4.416
 ## 
 ## $DFOP
-##          Estimate Pr(>t)    Lower    Upper
-## parent_0 97.96751     NA 94.21913 101.7159
-## k1        0.00952     NA  0.00221   0.0411
-## k2        0.00952     NA  0.00626   0.0145
-## g         0.21241     NA  0.00000   1.0000
-## sigma     4.18778     NA  2.39747   5.9781
+##          Estimate   Pr(>t)    Lower    Upper
+## parent_0 97.96751 2.85e-13 94.21913 101.7159
+## k1        0.00952 6.28e-02  0.00250   0.0363
+## k2        0.00952 1.27e-04  0.00646   0.0140
+## g         0.21241 5.00e-01  0.00000   1.0000
+## sigma     4.18778 2.50e-04  2.39747   5.9781
 ## 
 ## 
 ## DTx values:
@@ -882,7 +881,7 @@
 ## 
 ## Representative half-life:
 ## [1] 41.33
+
 
 
p15b <- nafta(NAFTA_SOP_Attachment[["p15b"]])## Warning in sqrt(diag(covar)): NaNs produced
@@ -890,10 +889,10 @@
 ## doubtful## Warning in sqrt(1/diag(V)): NaNs produced## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
-## The half-life obtained from the IORE model may be used
+
 
plot(p15b)
+
 
print(p15b)## Sums of squares:
 ##       SFO      IORE      DFOP 
@@ -911,7 +910,7 @@
 ## 
 ## $IORE
 ##                Estimate   Pr(>t)    Lower  Upper
-## parent_0          99.83 1.81e-16 97.51348 102.14
+## parent_0          99.83 1.81e-16 97.51349 102.14
 ## k__iore_parent     0.38 3.22e-01  0.00352  41.05
 ## N_parent           0.00 5.00e-01 -1.07696   1.08
 ## sigma              2.21 2.57e-04  1.23245   3.19
@@ -938,16 +937,16 @@
 
 The DFOP fraction parameter is greater than 1
-
+
 
p16 <- nafta(NAFTA_SOP_Attachment[["p16"]])## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c## The representative half-life of the IORE model is longer than the one corresponding## to the terminal degradation rate found with the DFOP model.
-## The representative half-life obtained from the DFOP model may be used
+
 
plot(p16)
+
 
print(p16)## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -998,7 +997,7 @@
 
 References
-
 
Benchmark timings for mkin
                         Johannes Ranke
             
-            2020-11-30
+            Last change 13 May 2020 (rebuilt 2021-02-15)
       
       Source: vignettes/web_only/benchmarks.rmd
       benchmarks.rmd
-## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge:
-## iteration limit reached without convergence (10)
-
-## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge:
-## iteration limit reached without convergence (10)
-
t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
+    error_model = "tc"))[["elapsed"]]
+t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
     error_model = "obs"))[["elapsed"]]
+
 
m_synth_SFO_lin <- mkinmod(parent = mkinsub("SFO", "M1"),
                            M1 = mkinsub("SFO", "M2"),
                            M2 = mkinsub("SFO"),
@@ -174,7 +167,7 @@
     error_model = "obs"))[["elapsed"]]
 t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
     error_model = "obs"))[["elapsed"]]
+
 
mkin_benchmarks[system_string, paste0("t", 1:11)] <-
   c(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)
 save(mkin_benchmarks, file = "~/git/mkin/vignettes/web_only/mkin_benchmarks.rda")1.786 
 3.729 
 
+
+ 
+1.0.3 
+1.722 
+3.419 
+
+ 
 
 
 1.0.3.9000 
+2.770 
+3.458 
+7.251 
 2.810 
 
+
+ 
+1.0.3 
+1.402 
+6.343 
+2.802 
+
+ 
 
 
 1.0.3.9000 
+1.405 
+6.417 
+2.824 
+
 Two metabolites
-
 
 
  
+mkin version 
@@ -388,6 +403,24 @@
 1.958 
 3.105 
 
+ 
+1.0.3 
+0.771 
+1.251 
+1.464 
+3.074 
+1.940 
+2.831 
+
+ 
 
 1.0.3.9000 
+0.772 
+1.263 
+1.483 
+3.101 
+1.958 
+2.843 
+
 
Performance benefit by using compiled model definitions in mkin
                         Johannes Ranke
             
-            2020-11-30
+            2021-02-15
       
       Source: vignettes/web_only/compiled_models.rmd
       compiled_models.rmd
+## 4            analytical            1    1.000   0.182
+## 3     deSolve, compiled            1    1.824   0.332
+## 2      Eigenvalue based            1    2.082   0.379
+## 1 deSolve, not compiled            1   46.181   8.405
 ##                    test replications relative elapsed
-## 4            analytical            1    1.000   0.187
-## 3     deSolve, compiled            1    1.807   0.338
-## 2      Eigenvalue based            1    2.032   0.380
-## 1 deSolve, not compiled            1   43.048   8.050## Temporary DLL for differentials generated and loaded
-##                    test replications relative elapsed
-## 2     deSolve, compiled            1    1.000   0.483
-## 1 deSolve, not compiled            1   29.969  14.475
+## Running under: Debian GNU/Linux bullseye/sid
 ## R version 4.0.3 (2020-10-10)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Debian GNU/Linux 10 (buster)## CPU model: AMD Ryzen 7 1700 Eight-Core Processor
 Features
+
+General
 
 
+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.plot.mmkin.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).compiled_models. The autogeneration of C code was inspired by the ccSolve package. Thanks to Karline Soetaert for her work on that.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 log-ratio transformation that is now used for the formation fractions.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.error_model to the mkinfit function.error_model = "obs".error_model = "tc".
+Unique in mkin
+
+
 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".transform_odeparms so their estimators can more reasonably be expected to follow a normal distribution.
+Performance
+
+
+plot.mmkin.compiled_models. The autogeneration of C code was inspired by the ccSolve package. Thanks to Karline Soetaert for her work on that.
 GUI
@@ -158,7 +175,7 @@
 
 News
-
@@ -171,6 +188,16 @@
 
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.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/docs/dev/news/index.html b/docs/dev/news/index.html
index 1421edf4..31c392f7 100644
--- a/docs/dev/news/index.html
+++ b/docs/dev/news/index.html
@@ -71,7 +71,7 @@
       
       
         mkin
-        1.0.2.9000
+        1.0.3.9000
       
     
NEWS.md
     
-mkin 1.0.2.9000 Unreleased 
+    
+mkin 1.0.3.9000 Unreleased 
 
 
@@ -161,6 +161,14 @@
 
+mkin 1.0.3 Unreleased 
+
+
+
 
diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml
index c74efaf7..4df60994 100644
--- a/docs/dev/pkgdown.yml
+++ b/docs/dev/pkgdown.yml
@@ -10,7 +10,7 @@ articles:
   web_only/NAFTA_examples: NAFTA_examples.html
   web_only/benchmarks: benchmarks.html
   web_only/compiled_models: compiled_models.html
-last_built: 2021-02-13T12:27Z
+last_built: 2021-02-15T16:08Z
 urls:
   reference: https://pkgdown.jrwb.de/mkin/reference
   article: https://pkgdown.jrwb.de/mkin/articles
diff --git a/docs/dev/reference/AIC.mmkin.html b/docs/dev/reference/AIC.mmkin.html
index b332257e..8c791755 100644
--- a/docs/dev/reference/AIC.mmkin.html
+++ b/docs/dev/reference/AIC.mmkin.html
@@ -73,7 +73,7 @@ same dataset." />
       
       
         mkin
-        0.9.50.4
+        1.0.3.9000
       
     
         
         
         
         
         
         
         
         
         
         
         
         

         
         

         

         
         

         
         
         


         
         




Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.
+Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical +Degradation Data. Environments 6(12) 124 +doi: 10.3390/environments6120124 +.
times <- c(0, 1, 3, 7, 14, 28, 60, 90, 120) diff --git a/docs/dev/reference/summary.mkinfit.html b/docs/dev/reference/summary.mkinfit.html index f314dfa8..494731e9 100644 --- a/docs/dev/reference/summary.mkinfit.html +++ b/docs/dev/reference/summary.mkinfit.html @@ -76,7 +76,7 @@ values." /> mkin - 0.9.50.4 + 1.0.3.9000@@ -125,7 +125,7 @@ values." />
#> mkin version used for fitting: 0.9.50.4 +#> mkin version used for fitting: 1.0.3.9000 #> R version used for fitting: 4.0.3 -#> Date of fit: Mon Nov 30 16:01:20 2020 -#> Date of summary: Mon Nov 30 16:01:20 2020 +#> Date of fit: Mon Feb 15 17:13:09 2021 +#> Date of summary: Mon Feb 15 17:13:09 2021 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.028 s +#> Fitted using 131 model solutions performed in 0.027 s #> #> Error model: Constant variance #> diff --git a/docs/dev/reference/summary.nlme.mmkin.html b/docs/dev/reference/summary.nlme.mmkin.html index 2aeadc46..b2f6624a 100644 --- a/docs/dev/reference/summary.nlme.mmkin.html +++ b/docs/dev/reference/summary.nlme.mmkin.html @@ -76,7 +76,7 @@ endpoints such as formation fractions and DT50 values. Optionally mkin - 0.9.50.4 + 1.0.3.9000@@ -125,7 +125,7 @@ endpoints such as formation fractions and DT50 values. Optionally

