From a9427a09abdf7ce9aaeae7c7190f90c8f2e5ef52 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 15 Feb 2021 14:08:13 +0100 Subject: Improve README, introductory vignette and some other docs Also bump version to 1.0.3. --- DESCRIPTION | 4 +- NEWS.md | 4 + R/sigma_twocomp.R | 5 + README.html | 40 ++- README.md | 99 +++++--- build.log | 2 +- check.log | 2 +- docs/404.html | 2 +- docs/articles/FOCUS_D.html | 22 +- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ docs/articles/FOCUS_D_files/figure-html/plot-1.png | Bin 79550 -> 79176 bytes .../FOCUS_D_files/header-attrs-2.6/header-attrs.js | 12 + docs/articles/FOCUS_L.html | 128 +++++----- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../figure-html/unnamed-chunk-10-1.png | Bin 42372 -> 42203 bytes .../figure-html/unnamed-chunk-12-1.png | Bin 82635 -> 82006 bytes .../figure-html/unnamed-chunk-13-1.png | Bin 32949 -> 32751 bytes .../figure-html/unnamed-chunk-15-1.png | Bin 58309 -> 57939 bytes .../figure-html/unnamed-chunk-4-1.png | Bin 35417 -> 35238 bytes .../figure-html/unnamed-chunk-6-1.png | Bin 35848 -> 35640 bytes .../figure-html/unnamed-chunk-8-1.png | Bin 41558 -> 41399 bytes .../FOCUS_L_files/header-attrs-2.6/header-attrs.js | 12 + docs/articles/index.html | 2 +- docs/articles/mkin.html | 59 +++-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../mkin_files/figure-html/unnamed-chunk-2-1.png | Bin 90521 -> 89958 bytes .../mkin_files/header-attrs-2.6/header-attrs.js | 12 + docs/articles/twa.html | 10 +- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../twa_files/header-attrs-2.6/header-attrs.js | 12 + docs/articles/web_only/FOCUS_Z.html | 32 +-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../figure-html/FOCUS_2006_Z_fits_1-1.png | Bin 67049 -> 66640 bytes .../figure-html/FOCUS_2006_Z_fits_10-1.png | Bin 106768 -> 106038 bytes .../figure-html/FOCUS_2006_Z_fits_11-1.png | Bin 105777 -> 105042 bytes .../figure-html/FOCUS_2006_Z_fits_11a-1.png | Bin 76400 -> 75626 bytes .../figure-html/FOCUS_2006_Z_fits_11b-1.png | Bin 35734 -> 35744 bytes .../figure-html/FOCUS_2006_Z_fits_2-1.png | Bin 67049 -> 66640 bytes .../figure-html/FOCUS_2006_Z_fits_3-1.png | Bin 66804 -> 66424 bytes .../figure-html/FOCUS_2006_Z_fits_5-1.png | Bin 81025 -> 80520 bytes .../figure-html/FOCUS_2006_Z_fits_6-1.png | Bin 105745 -> 105149 bytes .../figure-html/FOCUS_2006_Z_fits_7-1.png | Bin 105161 -> 104479 bytes .../figure-html/FOCUS_2006_Z_fits_9-1.png | Bin 89419 -> 88890 bytes .../FOCUS_Z_files/header-attrs-2.6/header-attrs.js | 12 + docs/articles/web_only/NAFTA_examples.html | 178 ++++++------- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../NAFTA_examples_files/figure-html/p10-1.png | Bin 79145 -> 78793 bytes .../NAFTA_examples_files/figure-html/p11-1.png | Bin 75730 -> 75470 bytes .../NAFTA_examples_files/figure-html/p12a-1.png | Bin 81215 -> 80755 bytes .../NAFTA_examples_files/figure-html/p12b-1.png | Bin 70120 -> 69885 bytes .../NAFTA_examples_files/figure-html/p13-1.png | Bin 77502 -> 77126 bytes .../NAFTA_examples_files/figure-html/p14-1.png | Bin 79961 -> 79693 bytes .../NAFTA_examples_files/figure-html/p15a-1.png | Bin 76342 -> 75945 bytes .../NAFTA_examples_files/figure-html/p15b-1.png | Bin 78251 -> 78004 bytes .../NAFTA_examples_files/figure-html/p16-1.png | Bin 93322 -> 93075 bytes .../NAFTA_examples_files/figure-html/p5a-1.png | Bin 81873 -> 81521 bytes .../NAFTA_examples_files/figure-html/p5b-1.png | Bin 79970 -> 79783 bytes .../NAFTA_examples_files/figure-html/p6-1.png | Bin 82238 -> 81974 bytes .../NAFTA_examples_files/figure-html/p7-1.png | Bin 101821 -> 101606 bytes .../NAFTA_examples_files/figure-html/p8-1.png | Bin 92053 -> 91429 bytes .../NAFTA_examples_files/figure-html/p9a-1.png | Bin 78348 -> 77612 bytes .../NAFTA_examples_files/figure-html/p9b-1.png | Bin 75683 -> 75129 bytes .../header-attrs-2.6/header-attrs.js | 12 + docs/articles/web_only/benchmarks.html | 50 ++-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../header-attrs-2.6/header-attrs.js | 12 + docs/articles/web_only/compiled_models.html | 22 +- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../header-attrs-2.6/header-attrs.js | 12 + docs/authors.html | 2 +- docs/index.html | 45 +++- docs/news/index.html | 10 +- docs/pkgdown.yml | 2 +- docs/reference/AIC.mmkin.html | 11 +- docs/reference/CAKE_export.html | 2 +- docs/reference/D24_2014.html | 2 +- docs/reference/DFOP.solution.html | 2 +- docs/reference/Extract.mmkin.html | 4 +- docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html | 2 +- docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html | 2 +- docs/reference/FOCUS_2006_HS_ref_A_to_F.html | 2 +- docs/reference/FOCUS_2006_SFO_ref_A_to_F.html | 2 +- docs/reference/FOCUS_2006_datasets.html | 2 +- docs/reference/FOMC.solution.html | 2 +- docs/reference/HS.solution.html | 2 +- docs/reference/IORE.solution.html | 2 +- docs/reference/NAFTA_SOP_2015-1.png | Bin 62443 -> 61980 bytes docs/reference/NAFTA_SOP_2015.html | 2 +- docs/reference/NAFTA_SOP_Attachment-1.png | Bin 64198 -> 63822 bytes docs/reference/NAFTA_SOP_Attachment.html | 6 +- docs/reference/Rplot001.png | Bin 27554 -> 13995 bytes docs/reference/Rplot002.png | Bin 59342 -> 13648 bytes docs/reference/Rplot003.png | Bin 33263 -> 15333 bytes docs/reference/Rplot004.png | Bin 24137 -> 10647 bytes docs/reference/Rplot005.png | Bin 24137 -> 19233 bytes docs/reference/Rplot006.png | Bin 22141 -> 24545 bytes docs/reference/Rplot007.png | Bin 25074 -> 24992 bytes docs/reference/SFO.solution.html | 2 +- docs/reference/SFORB.solution.html | 2 +- docs/reference/add_err-1.png | Bin 109220 -> 108676 bytes docs/reference/add_err-3.png | Bin 59105 -> 58909 bytes docs/reference/add_err.html | 2 +- docs/reference/aw.html | 2 +- docs/reference/confint.mkinfit.html | 44 ++-- docs/reference/create_deg_func.html | 8 +- docs/reference/dimethenamid_2018.html | 2 +- docs/reference/endpoints.html | 2 +- docs/reference/experimental_data_for_UBA-1.png | Bin 102782 -> 102212 bytes docs/reference/experimental_data_for_UBA.html | 2 +- docs/reference/f_time_norm_focus.html | 2 +- docs/reference/focus_soil_moisture.html | 2 +- docs/reference/get_deg_func.html | 2 +- docs/reference/ilr.html | 2 +- docs/reference/index.html | 2 +- docs/reference/loftest-3.png | Bin 76976 -> 76976 bytes docs/reference/loftest-5.png | Bin 73445 -> 73446 bytes docs/reference/loftest.html | 2 +- docs/reference/logLik.mkinfit.html | 2 +- docs/reference/logistic.solution-2.png | Bin 42283 -> 42118 bytes docs/reference/logistic.solution.html | 8 +- docs/reference/lrtest.mkinfit.html | 2 +- docs/reference/max_twa_parent.html | 2 +- docs/reference/mccall81_245T-1.png | Bin 63092 -> 62537 bytes docs/reference/mccall81_245T.html | 44 ++-- docs/reference/mixed-1.png | Bin 219775 -> 219866 bytes docs/reference/mixed.html | 12 +- docs/reference/mkin_long_to_wide.html | 2 +- docs/reference/mkin_wide_to_long.html | 2 +- docs/reference/mkinds.html | 2 +- docs/reference/mkindsg.html | 2 +- docs/reference/mkinerrmin.html | 2 +- docs/reference/mkinerrplot.html | 2 +- docs/reference/mkinfit-1.png | Bin 66175 -> 65835 bytes docs/reference/mkinfit.html | 128 +++++----- docs/reference/mkinmod.html | 6 +- docs/reference/mkinparplot-1.png | Bin 25707 -> 25702 bytes docs/reference/mkinparplot.html | 5 +- docs/reference/mkinplot.html | 2 +- docs/reference/mkinpredict.html | 6 +- docs/reference/mkinresplot.html | 2 +- docs/reference/mmkin-1.png | Bin 111011 -> 110459 bytes docs/reference/mmkin-2.png | Bin 107610 -> 107057 bytes docs/reference/mmkin-3.png | Bin 96207 -> 96062 bytes docs/reference/mmkin-4.png | Bin 67756 -> 67191 bytes docs/reference/mmkin-5.png | Bin 65061 -> 64880 bytes docs/reference/mmkin.html | 18 +- docs/reference/nafta-1.png | Bin 62443 -> 61980 bytes docs/reference/nafta.html | 2 +- docs/reference/nlme-1.png | Bin 70122 -> 70133 bytes docs/reference/nlme-2.png | Bin 94062 -> 94031 bytes docs/reference/nlme.html | 2 +- docs/reference/nlme.mmkin-1.png | Bin 124664 -> 124677 bytes docs/reference/nlme.mmkin-2.png | Bin 169529 -> 169523 bytes docs/reference/nlme.mmkin-3.png | Bin 172659 -> 172692 bytes docs/reference/nlme.mmkin.html | 28 +-- docs/reference/nobs.mkinfit.html | 2 +- docs/reference/parms.html | 12 +- docs/reference/plot.mixed.mmkin.html | 2 +- docs/reference/plot.mkinfit-2.png | Bin 73247 -> 73254 bytes docs/reference/plot.mkinfit-5.png | Bin 66920 -> 66560 bytes docs/reference/plot.mkinfit-6.png | Bin 73078 -> 72717 bytes docs/reference/plot.mkinfit-7.png | Bin 73909 -> 73553 bytes docs/reference/plot.mkinfit.html | 2 +- docs/reference/plot.mmkin-1.png | Bin 49402 -> 48997 bytes docs/reference/plot.mmkin-2.png | Bin 49753 -> 49376 bytes docs/reference/plot.mmkin-3.png | Bin 46090 -> 46202 bytes docs/reference/plot.mmkin-4.png | Bin 33266 -> 33057 bytes docs/reference/plot.mmkin-5.png | Bin 57777 -> 57372 bytes docs/reference/plot.mmkin.html | 2 +- docs/reference/plot.nafta.html | 2 +- docs/reference/reexports.html | 2 +- docs/reference/residuals.mkinfit.html | 4 +- docs/reference/schaefer07_complex_case-1.png | Bin 66982 -> 66965 bytes docs/reference/schaefer07_complex_case.html | 12 +- docs/reference/sigma_twocomp.html | 6 +- docs/reference/summary.mkinfit.html | 10 +- docs/reference/summary.nlme.mmkin.html | 80 +++--- docs/reference/synthetic_data_for_UBA_2014-1.png | Bin 67756 -> 67191 bytes docs/reference/synthetic_data_for_UBA_2014.html | 30 +-- docs/reference/test_data_from_UBA_2014-1.png | Bin 57796 -> 57395 bytes docs/reference/test_data_from_UBA_2014-2.png | Bin 73501 -> 72786 bytes docs/reference/test_data_from_UBA_2014.html | 24 +- docs/reference/transform_odeparms.html | 6 +- docs/reference/update.mkinfit.html | 2 +- man/sigma_twocomp.Rd | 4 + test.log | 4 +- vignettes/FOCUS_D.html | 78 ++---- vignettes/FOCUS_D.rmd | 2 +- vignettes/FOCUS_L.html | 190 ++++++-------- vignettes/FOCUS_L.rmd | 2 +- vignettes/mkin.html | 108 ++++---- vignettes/mkin.rmd | 94 ++++--- vignettes/references.bib | 18 +- vignettes/twa.html | 46 +++- vignettes/twa.rmd | 2 +- vignettes/web_only/FOCUS_Z.html | 136 +++++----- vignettes/web_only/FOCUS_Z.rmd | 2 +- vignettes/web_only/NAFTA_examples.html | 280 +++++++++++---------- vignettes/web_only/NAFTA_examples.rmd | 2 +- vignettes/web_only/benchmarks.html | 142 +++++++++-- vignettes/web_only/benchmarks.rmd | 2 +- vignettes/web_only/mkin_benchmarks.rda | Bin 1085 -> 1081 bytes 202 files changed, 1553 insertions(+), 1097 deletions(-) create mode 100644 docs/articles/FOCUS_D_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/FOCUS_D_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/FOCUS_L_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/FOCUS_L_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/mkin_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/twa_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/twa_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/web_only/FOCUS_Z_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/web_only/FOCUS_Z_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/web_only/NAFTA_examples_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/web_only/NAFTA_examples_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/web_only/benchmarks_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/web_only/benchmarks_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/articles/web_only/compiled_models_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/articles/web_only/compiled_models_files/header-attrs-2.6/header-attrs.js diff --git a/DESCRIPTION b/DESCRIPTION index c28966c1..18701d12 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data -Version: 1.0.2 -Date: 2021-02-13 +Version: 1.0.3 +Date: 2021-02-15 Authors@R: c( person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de", diff --git a/NEWS.md b/NEWS.md index da3fbc44..6152555c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# mkin 1.0.3 + +- Review and update README, the 'Introduction to mkin' vignette and some of the help pages + # mkin 1.0.2 - 'mkinfit': Keep model names stored in 'mkinmod' objects, avoiding their loss in 'gmkin' diff --git a/R/sigma_twocomp.R b/R/sigma_twocomp.R index e7f4368b..eee742bb 100644 --- a/R/sigma_twocomp.R +++ b/R/sigma_twocomp.R @@ -23,6 +23,11 @@ #' #' 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}. +#' #' @examples #' times <- c(0, 1, 3, 7, 14, 28, 60, 90, 120) #' d_pred <- data.frame(time = times, parent = 100 * exp(- 0.03 * times)) diff --git a/README.html b/README.html index c46cbc63..3f7e60d9 100644 --- a/README.html +++ b/README.html @@ -411,30 +411,44 @@ summary {

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.
  • -
  • 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.
  • -
  • 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 log-ratio 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.
  • -
  • When a metabolite decline phase is not described well by SFO kinetics, SFORB kinetics can be used for the metabolite.
  • -
  • Three different error models can be selected using the argument error_model to the mkinfit function.
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
  • -
  • A two-component error model similar to the one proposed by Rocke and Lorenzato can be selected using the argument error_model = "tc".
  • +
+
+
+

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.
  • +
  • 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.
  • +
  • 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.
  • +
  • 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 used by other tools for biphasic metabolite curves. However, the SFORB model has the advantage that there is a mechanistic interpretation of the model parameters.
  • 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

+
    +
  • 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.
  • +
+
+

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 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.

Credits and historical remarks

@@ -446,6 +460,16 @@ summary {

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.

+

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

+

References

diff --git a/README.md b/README.md index 973dbc89..af8ea24b 100644 --- a/README.md +++ b/README.md @@ -45,40 +45,19 @@ version is found in the ['dev' subdirectory](https://pkgdown.jrwb.de/mkin/dev/). ## Features +### General + * Highly flexible model specification using [`mkinmod`](https://pkgdown.jrwb.de/mkin/reference/mkinmod.html), 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`](https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html). * Model solution (forward modelling) in the function [`mkinpredict`](https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html) 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`](https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html). - 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. -* By default, kinetic rate constants and kinetic formation fractions are - transformed internally using - [`transform_odeparms`](https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html) - 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. -* 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 @@ -86,23 +65,59 @@ version is found in the ['dev' subdirectory](https://pkgdown.jrwb.de/mkin/dev/). 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. -* When a metabolite decline phase is not described well by SFO kinetics, - SFORB kinetics can be used for the metabolite. -* Three different error models can be selected using the argument `error_model` - to the [`mkinfit`](https://pkgdown.jrwb.de/mkin/reference/mkinfit.html) - function. * The 'variance by variable' error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as `error_model = "obs"`. -* A two-component error model similar to the one proposed by + +### Unique in mkin + +* Three different error models can be selected using the argument `error_model` + to the [`mkinfit`](https://pkgdown.jrwb.de/mkin/reference/mkinfit.html) + function. A two-component error model similar to the one proposed by [Rocke and Lorenzato](https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html) 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. +* By default, kinetic rate constants and kinetic formation fractions are + transformed internally using + [`transform_odeparms`](https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html) + so their estimators can more reasonably be expected to follow + a normal distribution. +* 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. +* 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 used by other tools for biphasic metabolite curves. + However, the SFORB model has the advantage that there is a mechanistic + interpretation of the model parameters. * 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](https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html) 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 + +* Parallel fitting of several models to several datasets is supported, see for + example + [`plot.mmkin`](https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html). +* If a C compiler is installed, the kinetic models are compiled from automatically + generated C code, see + [vignette `compiled_models`](https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html). + 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. +* Even if no compiler is installed, many degradation models still give + [very good performance](https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html), + as current versions of mkin also have [analytical solutions for some models + with one metabolite](https://jrwb.de/performance-improvements-mkin/), 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 @@ -111,8 +126,8 @@ for installation instructions and a manual. ## News -There is a ChangeLog, for the latest [CRAN release](https://cran.r-project.org/package=mkin/news/news.html) -and one for the [github master branch](https://github.com/jranke/mkin/blob/master/NEWS.md). +There is a list of changes for the latest [CRAN release](https://cran.r-project.org/package=mkin/news/news.html) +and one for each github branch, e.g. [the main branch](https://github.com/jranke/mkin/blob/master/NEWS.md). ## Credits and historical remarks @@ -167,6 +182,28 @@ Finally, there is 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 + +- Grant Number 112407 (Testing and validation of modelling software as an alternative +to ModelMaker 4.0, 2014-2015) +- Project Number 56703 (Optimization of gmkin for routine use in the Umweltbundesamt, 2015) +- 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) +- Project Number 120667 (Development of objective criteria for the evaluation + of the visual fit in the kinetic evaluation of degradation data, 2019-2020) +- Project 146839 (Checking the feasibility of using mixed-effects models for + the derivation of kinetic modelling parameters from degradation studies, 2020-2021) + ## References diff --git a/build.log b/build.log index 328804ad..ff0d2fb3 100644 --- a/build.log +++ b/build.log @@ -6,5 +6,5 @@ * creating vignettes ... OK * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories -* building ‘mkin_1.0.2.tar.gz’ +* building ‘mkin_1.0.3.tar.gz’ diff --git a/check.log b/check.log index 2dd7b49d..34732605 100644 --- a/check.log +++ b/check.log @@ -5,7 +5,7 @@ * using options ‘--no-tests --as-cran’ * checking for file ‘mkin/DESCRIPTION’ ... OK * checking extension type ... Package -* this is package ‘mkin’ version ‘1.0.2’ +* this is package ‘mkin’ version ‘1.0.3’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers Maintainer: ‘Johannes Ranke ’ diff --git a/docs/404.html b/docs/404.html index f038fb95..48cba3d7 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ mkin - 1.0.2 + 1.0.3 diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 786b2c47..f3a56065 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -31,7 +31,7 @@ mkin - 1.0.0 + 1.0.3 @@ -94,13 +94,13 @@ -
+
@@ -94,13 +94,13 @@ -
+
@@ -531,10 +531,10 @@

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.

 summary(mm.L3[["DFOP", 1]])
-
## mkin version used for fitting:    1.0.0 
+
## mkin version used for fitting:    1.0.3 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Wed Feb  3 17:32:18 2021 
-## Date of summary: Wed Feb  3 17:32:18 2021 
+## Date of fit:     Mon Feb 15 13:46:27 2021 
+## Date of summary: Mon Feb 15 13:46:28 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -581,11 +581,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.
@@ -644,17 +644,17 @@
 

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.

 summary(mm.L4[["SFO", 1]], data = FALSE)
-
## mkin version used for fitting:    1.0.0 
+
## mkin version used for fitting:    1.0.3 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Wed Feb  3 17:32:19 2021 
-## Date of summary: Wed Feb  3 17:32:19 2021 
+## Date of fit:     Mon Feb 15 13:46:28 2021 
+## Date of summary: Mon Feb 15 13:46:28 2021 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 142 model solutions performed in 0.03 s
+## Fitted using 142 model solutions performed in 0.031 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -709,17 +709,17 @@
 ## parent  106  352
 summary(mm.L4[["FOMC", 1]], data = FALSE)
-
## mkin version used for fitting:    1.0.0 
+
## mkin version used for fitting:    1.0.3 
 ## R version used for fitting:       4.0.3 
-## Date of fit:     Wed Feb  3 17:32:19 2021 
-## Date of summary: Wed Feb  3 17:32:19 2021 
+## Date of fit:     Mon Feb 15 13:46:28 2021 
+## Date of summary: Mon Feb 15 13:46:28 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.046 s
+## Fitted using 224 model solutions performed in 0.047 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -754,10 +754,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.
@@ -781,7 +781,7 @@
 

References

-
+

Ranke, Johannes. 2014. “Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.” Umweltbundesamt Projektnummer 27452.

diff --git a/docs/articles/FOCUS_L_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/FOCUS_L_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/FOCUS_L_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/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png index 80ca888e..e9c0b0a0 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png index 12e380da..3e03954d 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png index 8b2954c7..8c9e8fd4 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png index 922d1f0e..b3aa8334 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png index be3cbcd0..477829a5 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png index 55080b33..c0e08884 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png index d7b0793a..310b4f3b 100644 Binary files a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/FOCUS_L_files/header-attrs-2.6/header-attrs.js b/docs/articles/FOCUS_L_files/header-attrs-2.6/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/FOCUS_L_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/articles/index.html b/docs/articles/index.html index 52770090..22753e8d 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ mkin - 1.0.2 + 1.0.3
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index e240323f..6dbb093d 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -31,7 +31,7 @@ mkin - 1.0.0 + 1.0.3
@@ -94,13 +94,13 @@ -
+
+## Z3 11.80986 39.2315

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.

@@ -351,13 +351,13 @@ ## ## $SFORB ## Z0_b1 Z0_b2 Z3_b1 Z3_b2 -## 2.4471371 0.0075126 0.0800070 0.0000000 +## 2.4471322 0.0075125 0.0800069 0.0000000 ## ## $distimes ## DT50 DT90 DT50back DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2 -## Z0 0.3043 1.1848 0.35666 0.28325 92.265 NA NA +## Z0 0.3043 1.1848 0.35666 0.28325 92.266 NA NA ## Z1 1.5148 5.0320 NA NA NA NA NA -## Z2 1.6414 5.4525 NA NA NA NA NA +## Z2 1.6414 5.4526 NA NA NA NA NA ## Z3 NA NA NA NA NA 8.6636 Inf

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.

@@ -365,9 +365,9 @@

References

-
+
-

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.

diff --git a/docs/articles/web_only/FOCUS_Z_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/web_only/FOCUS_Z_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/web_only/FOCUS_Z_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/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png index 3da22dad..2213c446 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png index 8c152f77..61b04d3a 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png index 732e6c65..409f1203 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png index cf6d45ca..4d6820cd 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png index 5c29341c..2e504961 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png index 3da22dad..2213c446 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png index 02a97a1e..7ab743af 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png index d070e7ed..2e0dce77 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png index 65309e3b..458299c1 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png index 22610e84..eb833066 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png index 47d46a9f..e7501cbb 100644 Binary files a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png and b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png differ diff --git a/docs/articles/web_only/FOCUS_Z_files/header-attrs-2.6/header-attrs.js b/docs/articles/web_only/FOCUS_Z_files/header-attrs-2.6/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/web_only/FOCUS_Z_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/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html index d3e23253..e79375b3 100644 --- a/docs/articles/web_only/NAFTA_examples.html +++ b/docs/articles/web_only/NAFTA_examples.html @@ -31,7 +31,7 @@ mkin - 1.0.0 + 1.0.3
@@ -94,13 +94,13 @@ -
+
- - - + + +
3.729
1.0.01.7703.7031.0.31.7223.419
@@ -302,10 +296,10 @@ 2.810 -1.0.0 -1.373 -7.127 -2.762 +1.0.3 +1.402 +6.343 +2.802 @@ -313,7 +307,7 @@

Two metabolites

-

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.

@@ -398,13 +392,13 @@ - - - - - - - + + + + + + +
mkin version3.105
1.0.00.7751.2691.4673.7671.9192.9421.0.30.7711.2511.4643.0741.9402.831
diff --git a/docs/articles/web_only/benchmarks_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/web_only/benchmarks_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/web_only/benchmarks_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/articles/web_only/benchmarks_files/header-attrs-2.6/header-attrs.js b/docs/articles/web_only/benchmarks_files/header-attrs-2.6/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/web_only/benchmarks_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/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html index e45655b6..ce8d8481 100644 --- a/docs/articles/web_only/compiled_models.html +++ b/docs/articles/web_only/compiled_models.html @@ -31,7 +31,7 @@ mkin - 1.0.0 + 1.0.3
@@ -94,13 +94,13 @@ -
+
##                    test replications relative elapsed
 ## 4            analytical            1    1.000   0.181
-## 3     deSolve, compiled            1    1.818   0.329
-## 2      Eigenvalue based            1    2.061   0.373
-## 1 deSolve, not compiled            1   43.923   7.950
+## 3 deSolve, compiled 1 1.812 0.328 +## 2 Eigenvalue based 1 2.088 0.378 +## 1 deSolve, not compiled 1 45.923 8.312

We see that using the compiled model is by more than a factor of 10 faster than using deSolve without compiled code.

@@ -188,13 +188,13 @@ }
## Temporary DLL for differentials generated and loaded
##                    test replications relative elapsed
-## 2     deSolve, compiled            1    1.000   0.474
-## 1 deSolve, not compiled            1   30.179  14.305
-

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 1.0.0 on

+## 2 deSolve, compiled 1 1.000 0.486 +## 1 deSolve, not compiled 1 31.597 15.356 +

Here we get a performance benefit of a factor of 32 using the version of the differential equation model compiled from C code!

+

This vignette was built with mkin 1.0.3 on

## R version 4.0.3 (2020-10-10)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Debian GNU/Linux 10 (buster)
+## Running under: Debian GNU/Linux bullseye/sid
## CPU model: AMD Ryzen 7 1700 Eight-Core Processor
diff --git a/docs/articles/web_only/compiled_models_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/web_only/compiled_models_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/web_only/compiled_models_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/articles/web_only/compiled_models_files/header-attrs-2.6/header-attrs.js b/docs/articles/web_only/compiled_models_files/header-attrs-2.6/header-attrs.js new file mode 100644 index 00000000..dd57d92e --- /dev/null +++ b/docs/articles/web_only/compiled_models_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/authors.html b/docs/authors.html index e80c3930..61d29bf0 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ mkin - 1.0.2 + 1.0.3
diff --git a/docs/index.html b/docs/index.html index 51571c81..88f118ea 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ mkin - 1.0.2 + 1.0.3 @@ -132,23 +132,40 @@

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.
  • -
  • 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.
  • -
  • 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 log-ratio 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.
  • -
  • When a metabolite decline phase is not described well by SFO kinetics, SFORB kinetics can be used for the metabolite.
  • -
  • Three different error models can be selected using the argument error_model to the mkinfit function.
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
  • -
  • A two-component error model similar to the one proposed by Rocke and Lorenzato can be selected using the argument error_model = "tc".
  • +
+
+
+

+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.
  • +
  • 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.
  • +
  • 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.
  • +
  • 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 used by other tools for biphasic metabolite curves. However, the SFORB model has the advantage that there is a mechanistic interpretation of the model parameters.
  • 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

+
    +
  • 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.
  • +
+
+

GUI

@@ -157,7 +174,7 @@

News

-

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.

@@ -170,6 +187,16 @@

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.

+

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

+
    +
  • Grant Number 112407 (Testing and validation of modelling software as an alternative to ModelMaker 4.0, 2014-2015)
  • +
  • Project Number 56703 (Optimization of gmkin for routine use in the Umweltbundesamt, 2015)
  • +
  • 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)
  • +
  • Project Number 120667 (Development of objective criteria for the evaluation of the visual fit in the kinetic evaluation of degradation data, 2019-2020)
  • +
  • Project 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021)
  • +

diff --git a/docs/news/index.html b/docs/news/index.html index 766e6549..82fb92bd 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ mkin - 1.0.2 + 1.0.3

@@ -141,6 +141,14 @@ Source: NEWS.md
+
+

+mkin 1.0.3 Unreleased +

+ +

mkin 1.0.2 Unreleased diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index f1fe0ec9..847dd4c5 100644 --- a/docs/pkgdown.yml +++ b/docs/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-13T05:53Z +last_built: 2021-02-15T13:07Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/reference/AIC.mmkin.html b/docs/reference/AIC.mmkin.html index f54fd70f..fbc90802 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -73,7 +73,7 @@ same dataset." /> mkin - 1.0.0 + 1.0.3

@@ -187,8 +187,7 @@ dataframe if there are several fits in the column).

f <- mmkin(c("SFO", "FOMC", "DFOP"), list("FOCUS A" = FOCUS_2006_A, "FOCUS C" = FOCUS_2006_C), cores = 1, quiet = TRUE) -
#> Warning: Optimisation did not converge: -#> false convergence (8)
# We get a warning because the FOMC model does not converge for the + # We get a warning because the FOMC model does not converge for the # FOCUS A dataset, as it is well described by SFO AIC(f["SFO", "FOCUS A"]) # We get a single number for a single fit @@ -199,15 +198,15 @@ dataframe if there are several fits in the column).

AIC(f[, "FOCUS A"])
#> df AIC #> SFO 3 55.28197 -#> FOMC 4 57.28211 +#> FOMC 4 57.28222 #> DFOP 5 59.28197
AIC(f[, "FOCUS A"], k = 0) # If we do not penalize additional parameters, we get nearly the same
#> df AIC #> SFO 3 49.28197 -#> FOMC 4 49.28211 +#> FOMC 4 49.28222 #> DFOP 5 49.28197
BIC(f[, "FOCUS A"]) # Comparing the BIC gives a very similar picture
#> df BIC #> SFO 3 55.52030 -#> FOMC 4 57.59987 +#> FOMC 4 57.59999 #> DFOP 5 59.67918
# For FOCUS C, the more complex models fit better AIC(f[, "FOCUS C"]) diff --git a/docs/reference/CAKE_export.html b/docs/reference/CAKE_export.html index dcccca1b..05cd04a7 100644 --- a/docs/reference/CAKE_export.html +++ b/docs/reference/CAKE_export.html @@ -73,7 +73,7 @@ specified as well." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/D24_2014.html b/docs/reference/D24_2014.html index b78e73ef..e2d47f1b 100644 --- a/docs/reference/D24_2014.html +++ b/docs/reference/D24_2014.html @@ -77,7 +77,7 @@ constrained by data protection regulations." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index cff29301..d04f98cc 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -73,7 +73,7 @@ two exponential decline functions." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 4e3cbe64..5a99cf1b 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 @@ -220,7 +220,7 @@ either a list of mkinfit objects or a single mkinfit object.

)
#> $par #> parent_0 log_alpha log_beta sigma -#> 99.666193 2.549849 5.050586 1.890202 +#> 99.666192 2.549850 5.050586 1.890202 #> #> $objective #> [1] 28.58291 diff --git a/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html index d37fa5a5..ba1cb19a 100644 --- a/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html +++ b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html @@ -76,7 +76,7 @@ in this fit." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html index d3f7894c..cfb60536 100644 --- a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html @@ -76,7 +76,7 @@ in this fit." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html index a18abad5..c90bcdbb 100644 --- a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html @@ -76,7 +76,7 @@ in this fit." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html index e0fbc498..7b2747dc 100644 --- a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html @@ -76,7 +76,7 @@ in this fit." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/FOCUS_2006_datasets.html b/docs/reference/FOCUS_2006_datasets.html index 543e24ad..7a39dcd0 100644 --- a/docs/reference/FOCUS_2006_datasets.html +++ b/docs/reference/FOCUS_2006_datasets.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index c376227c..9136b882 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -73,7 +73,7 @@ a decreasing rate constant." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index 8a90fec3..e3009bcc 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -73,7 +73,7 @@ between them." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index 8e6a2792..f1a40d44 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -73,7 +73,7 @@ a concentration dependent rate constant." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/NAFTA_SOP_2015-1.png b/docs/reference/NAFTA_SOP_2015-1.png index 76d724f0..4f0d7833 100644 Binary files a/docs/reference/NAFTA_SOP_2015-1.png and b/docs/reference/NAFTA_SOP_2015-1.png differ diff --git a/docs/reference/NAFTA_SOP_2015.html b/docs/reference/NAFTA_SOP_2015.html index 301bf684..de9db9eb 100644 --- a/docs/reference/NAFTA_SOP_2015.html +++ b/docs/reference/NAFTA_SOP_2015.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/NAFTA_SOP_Attachment-1.png b/docs/reference/NAFTA_SOP_Attachment-1.png index eec3dd9b..9417685e 100644 Binary files a/docs/reference/NAFTA_SOP_Attachment-1.png and b/docs/reference/NAFTA_SOP_Attachment-1.png differ diff --git a/docs/reference/NAFTA_SOP_Attachment.html b/docs/reference/NAFTA_SOP_Attachment.html index 03a45bc3..0b063e2c 100644 --- a/docs/reference/NAFTA_SOP_Attachment.html +++ b/docs/reference/NAFTA_SOP_Attachment.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 @@ -193,7 +193,7 @@ #> Estimate Pr(>t) Lower Upper #> parent_0 9.99e+01 1.41e-26 98.8116 101.0810 #> k1 2.67e-02 5.05e-06 0.0243 0.0295 -#> k2 2.42e-12 5.00e-01 0.0000 Inf +#> k2 2.26e-12 5.00e-01 0.0000 Inf #> g 6.47e-01 3.67e-06 0.6248 0.6677 #> sigma 1.27e+00 8.91e-06 0.8395 1.6929 #> @@ -202,7 +202,7 @@ #> DT50 DT90 DT50_rep #> SFO 67.7 2.25e+02 6.77e+01 #> IORE 58.2 1.07e+03 3.22e+02 -#> DFOP 55.5 5.22e+11 2.86e+11 +#> DFOP 55.5 5.59e+11 3.07e+11 #> #> Representative half-life: #> [1] 321.51
plot(nafta_att_p5a) diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png index 762a3dd4..7f498242 100644 Binary files a/docs/reference/Rplot001.png and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png index d24e35b4..54c31a3f 100644 Binary files a/docs/reference/Rplot002.png and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png index e96adeb3..19198739 100644 Binary files a/docs/reference/Rplot003.png and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png index 91058d4b..1028a9c4 100644 Binary files a/docs/reference/Rplot004.png and b/docs/reference/Rplot004.png differ diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png index 91058d4b..aa844051 100644 Binary files a/docs/reference/Rplot005.png and b/docs/reference/Rplot005.png differ diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png index 74f43dfa..81525882 100644 Binary files a/docs/reference/Rplot006.png and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/Rplot007.png b/docs/reference/Rplot007.png index fce3b6ee..10b7455a 100644 Binary files a/docs/reference/Rplot007.png and b/docs/reference/Rplot007.png differ diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index 7e4fb237..826a0472 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index 7254c451..b2062e30 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -76,7 +76,7 @@ and no substance in the bound fraction." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/add_err-1.png b/docs/reference/add_err-1.png index 9d333cbb..9ba106db 100644 Binary files a/docs/reference/add_err-1.png and b/docs/reference/add_err-1.png differ diff --git a/docs/reference/add_err-3.png b/docs/reference/add_err-3.png index 07cf0032..493a761a 100644 Binary files a/docs/reference/add_err-3.png and b/docs/reference/add_err-3.png differ diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index 2009aaf4..6fbecd14 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -74,7 +74,7 @@ may depend on the predicted value and is specified as a standard deviation." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/aw.html b/docs/reference/aw.html index 77ee9cef..6399b839 100644 --- a/docs/reference/aw.html +++ b/docs/reference/aw.html @@ -74,7 +74,7 @@ by Burnham and Anderson (2004)." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html index b71e039a..06e78459 100644 --- a/docs/reference/confint.mkinfit.html +++ b/docs/reference/confint.mkinfit.html @@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." /> mkin - 1.0.0 + 1.0.3 @@ -285,13 +285,13 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, f_d_1 <- mkinfit(SFO_SFO, subset(FOCUS_2006_D, value != 0), quiet = TRUE) system.time(ci_profile <- confint(f_d_1, method = "profile", cores = 1, quiet = TRUE))
#> user system elapsed -#> 4.324 0.980 3.960
# Using more cores does not save much time here, as parent_0 takes up most of the time +#> 4.255 1.029 3.937
# Using more cores does not save much time here, as parent_0 takes up most of the time # If we additionally exclude parent_0 (the confidence of which is often of # minor interest), we get a nice performance improvement if we use at least 4 cores system.time(ci_profile_no_parent_0 <- confint(f_d_1, method = "profile", c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores))
#> Profiling the likelihood
#> user system elapsed -#> 1.480 0.109 0.905
ci_profile +#> 1.469 0.092 0.911
ci_profile
#> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 #> k_parent_sink 0.040762501 5.549764e-02 @@ -349,14 +349,14 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> sigma 2.535612399 3.985263e+00
ci_quadratic_transformed_ff <- confint(f_d_2, method = "quadratic") ci_quadratic_transformed_ff
#> 2.5% 97.5% -#> parent_0 96.403833585 102.79311650 +#> parent_0 96.403833578 102.79311649 #> k_parent 0.090823771 0.10725430 #> k_m1 0.004012219 0.00689755 #> f_parent_to_m1 0.469118824 0.55959615 #> sigma 2.396089689 3.85491806
ci_quadratic_untransformed_ff <- confint(f_d_2, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed_ff
#> 2.5% 97.5% -#> parent_0 96.403833589 1.027931e+02 +#> parent_0 96.403833583 1.027931e+02 #> k_parent 0.090491913 1.069035e-01 #> k_m1 0.003835485 6.685823e-03 #> f_parent_to_m1 0.469113477 5.598387e-01 @@ -374,15 +374,15 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> f_parent_to_m1 TRUE FALSE #> sigma TRUE FALSE
rel_diffs_transformed_ff
#> 2.5% 97.5% -#> parent_0 0.0005408689 0.0002217234 +#> parent_0 0.0005408690 0.0002217233 #> k_parent 0.0009598532 0.0009001864 -#> k_m1 0.0307283044 0.0290588365 -#> f_parent_to_m1 0.0046881768 0.0027780063 +#> k_m1 0.0307283041 0.0290588361 +#> f_parent_to_m1 0.0046881769 0.0027780063 #> sigma 0.0550252516 0.0327066836
rel_diffs_untransformed_ff
#> 2.5% 97.5% -#> parent_0 0.0005408689 0.0002217233 -#> k_parent 0.0046102155 0.0023732281 -#> k_m1 0.0146740688 0.0025291817 +#> parent_0 0.0005408689 0.0002217232 +#> k_parent 0.0046102156 0.0023732281 +#> k_m1 0.0146740690 0.0025291820 #> f_parent_to_m1 0.0046995211 0.0023457712 #> sigma 0.0550252516 0.0327066836
# The profiling for the following fit does not finish in a reasonable time, @@ -396,18 +396,18 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, error_model_algorithm = "direct", quiet = TRUE) confint(f_tc_2, method = "quadratic")
#> 2.5% 97.5% -#> parent_0 94.596126334 106.19944007 -#> k_M1 0.037605408 0.04490759 -#> k_M2 0.008568739 0.01087675 -#> f_parent_to_M1 0.021463787 0.62023881 -#> f_parent_to_M2 0.015166531 0.37975349 -#> k1 0.273897467 0.33388084 -#> k2 0.018614555 0.02250379 -#> g 0.671943606 0.73583278 -#> sigma_low 0.251283766 0.83992113 -#> rsd_high 0.040411014 0.07662005
confint(f_tc_2, "parent_0", method = "quadratic") +#> parent_0 94.596039609 106.19954892 +#> k_M1 0.037605368 0.04490762 +#> k_M2 0.008568731 0.01087676 +#> f_parent_to_M1 0.021462489 0.62023882 +#> f_parent_to_M2 0.015165617 0.37975348 +#> k1 0.273897348 0.33388101 +#> k2 0.018614554 0.02250378 +#> g 0.671943411 0.73583305 +#> sigma_low 0.251283495 0.83992077 +#> rsd_high 0.040411024 0.07662008
confint(f_tc_2, "parent_0", method = "quadratic")
#> 2.5% 97.5% -#> parent_0 94.59613 106.1994
# } +#> parent_0 94.59604 106.1995
# }
@@ -182,7 +182,7 @@ replications = 2)
#> Loading required package: rbenchmark
#> test replications elapsed relative user.self sys.self user.child #> 1 analytical 2 0.389 1.000 0.389 0 0 -#> 2 deSolve 2 0.689 1.771 0.688 0 0 +#> 2 deSolve 2 0.690 1.774 0.690 0 0 #> sys.child #> 1 0 #> 2 0
DFOP_SFO <- mkinmod( @@ -193,8 +193,8 @@ deSolve = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), replications = 2)
#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.825 1.000 0.825 0 0 -#> 2 deSolve 2 1.574 1.908 1.573 0 0 +#> 1 analytical 2 0.817 1.000 0.818 0 0 +#> 2 deSolve 2 1.591 1.947 1.591 0 0 #> sys.child #> 1 0 #> 2 0
# } diff --git a/docs/reference/dimethenamid_2018.html b/docs/reference/dimethenamid_2018.html index 435848c2..6845f74f 100644 --- a/docs/reference/dimethenamid_2018.html +++ b/docs/reference/dimethenamid_2018.html @@ -77,7 +77,7 @@ constrained by data protection regulations." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index e42ca9fe..584079d2 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -78,7 +78,7 @@ advantage that the SFORB model can also be used for metabolites." /> mkin - 1.0.2 + 1.0.3 diff --git a/docs/reference/experimental_data_for_UBA-1.png b/docs/reference/experimental_data_for_UBA-1.png index 22f38cc2..33946ded 100644 Binary files a/docs/reference/experimental_data_for_UBA-1.png and b/docs/reference/experimental_data_for_UBA-1.png differ diff --git a/docs/reference/experimental_data_for_UBA.html b/docs/reference/experimental_data_for_UBA.html index 9333a34f..77f75678 100644 --- a/docs/reference/experimental_data_for_UBA.html +++ b/docs/reference/experimental_data_for_UBA.html @@ -100,7 +100,7 @@ Dataset 12 is from the Renewal Assessment Report (RAR) for thifensulfuron-methyl mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/f_time_norm_focus.html b/docs/reference/f_time_norm_focus.html index 6917b4b3..aa494b27 100644 --- a/docs/reference/f_time_norm_focus.html +++ b/docs/reference/f_time_norm_focus.html @@ -73,7 +73,7 @@ in Appendix 8 to the FOCUS kinetics guidance (FOCUS 2014, p. 369)." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/focus_soil_moisture.html b/docs/reference/focus_soil_moisture.html index f0c766da..61f235db 100644 --- a/docs/reference/focus_soil_moisture.html +++ b/docs/reference/focus_soil_moisture.html @@ -73,7 +73,7 @@ corresponds to pF2, MWHC to pF 1 and 1/3 bar to pF 2.5." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/get_deg_func.html b/docs/reference/get_deg_func.html index a0e341c9..44703806 100644 --- a/docs/reference/get_deg_func.html +++ b/docs/reference/get_deg_func.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index b91ef055..671faf5d 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -73,7 +73,7 @@ transformations." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/index.html b/docs/reference/index.html index 7b1bc4f1..e21304b9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ mkin - 1.0.2 + 1.0.3 diff --git a/docs/reference/loftest-3.png b/docs/reference/loftest-3.png index 43e6a00f..6afd084b 100644 Binary files a/docs/reference/loftest-3.png and b/docs/reference/loftest-3.png differ diff --git a/docs/reference/loftest-5.png b/docs/reference/loftest-5.png index cf7e5862..43460a65 100644 Binary files a/docs/reference/loftest-5.png and b/docs/reference/loftest-5.png differ diff --git a/docs/reference/loftest.html b/docs/reference/loftest.html index 614b8eea..6e72774e 100644 --- a/docs/reference/loftest.html +++ b/docs/reference/loftest.html @@ -75,7 +75,7 @@ lrtest.default from the lmtest package." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/logLik.mkinfit.html b/docs/reference/logLik.mkinfit.html index 8d984e55..9e5b4069 100644 --- a/docs/reference/logLik.mkinfit.html +++ b/docs/reference/logLik.mkinfit.html @@ -76,7 +76,7 @@ the error model." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/logistic.solution-2.png b/docs/reference/logistic.solution-2.png index 79bf3453..73e6436d 100644 Binary files a/docs/reference/logistic.solution-2.png and b/docs/reference/logistic.solution-2.png differ diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index 404344a3..d11e1b3c 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -73,7 +73,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> mkin - 1.0.0 + 1.0.3 @@ -240,10 +240,10 @@ Version 1.1, 18 December 2014 plot_sep(m)
summary(m)$bpar
#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 1.057896e+02 1.9023449703 55.610119 3.768361e-16 1.016451e+02 -#> kmax 6.398190e-02 0.0143201031 4.467978 3.841829e-04 3.929235e-02 +#> parent_0 1.057896e+02 1.9023449590 55.610120 3.768360e-16 1.016451e+02 +#> kmax 6.398190e-02 0.0143201029 4.467978 3.841828e-04 3.929235e-02 #> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08 -#> r 2.263946e-01 0.1718110715 1.317695 1.061044e-01 4.335843e-02 +#> r 2.263946e-01 0.1718110662 1.317695 1.061043e-01 4.335843e-02 #> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 #> Upper #> parent_0 109.9341588 diff --git a/docs/reference/lrtest.mkinfit.html b/docs/reference/lrtest.mkinfit.html index e39314d9..d670fb0c 100644 --- a/docs/reference/lrtest.mkinfit.html +++ b/docs/reference/lrtest.mkinfit.html @@ -76,7 +76,7 @@ and can be expressed by fixing the parameters of the other." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/max_twa_parent.html b/docs/reference/max_twa_parent.html index 2aa5d5f1..4d473893 100644 --- a/docs/reference/max_twa_parent.html +++ b/docs/reference/max_twa_parent.html @@ -78,7 +78,7 @@ soil section of the FOCUS guidance." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mccall81_245T-1.png b/docs/reference/mccall81_245T-1.png index 58ae716a..91fe060e 100644 Binary files a/docs/reference/mccall81_245T-1.png and b/docs/reference/mccall81_245T-1.png differ diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index b99138a0..b7dca4a7 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -74,7 +74,7 @@ mkin - 1.0.0 + 1.0.3 @@ -181,30 +181,30 @@ fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"), quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(fit.1)$bpar
#> Estimate se_notrans t value Pr(>t) -#> T245_0 1.038550e+02 2.1847074888 47.537272 4.472189e-18 +#> T245_0 1.038550e+02 2.1847074945 47.537272 4.472189e-18 #> k_T245 4.337042e-02 0.0018983965 22.845818 2.276911e-13 -#> k_phenol 4.050581e-01 0.2986993400 1.356073 9.756988e-02 -#> k_anisole 6.678742e-03 0.0008021439 8.326114 2.623176e-07 -#> f_T245_to_phenol 6.227599e-01 0.3985340295 1.562627 6.949412e-02 -#> f_phenol_to_anisole 1.000000e+00 0.6718439378 1.488441 7.867787e-02 -#> sigma 2.514628e+00 0.4907558750 5.123989 6.233156e-05 +#> k_phenol 4.050581e-01 0.2986993563 1.356073 9.756989e-02 +#> k_anisole 6.678742e-03 0.0008021439 8.326114 2.623177e-07 +#> f_T245_to_phenol 6.227599e-01 0.3985340558 1.562627 6.949413e-02 +#> f_phenol_to_anisole 1.000000e+00 0.6718439825 1.488441 7.867789e-02 +#> sigma 2.514628e+00 0.4907558883 5.123989 6.233157e-05 #> Lower Upper -#> T245_0 99.246061370 1.084640e+02 +#> T245_0 99.246061385 1.084640e+02 #> k_T245 0.039631621 4.746194e-02 -#> k_phenol 0.218013878 7.525762e-01 +#> k_phenol 0.218013879 7.525762e-01 #> k_anisole 0.005370739 8.305299e-03 -#> f_T245_to_phenol 0.547559083 6.924813e-01 +#> f_T245_to_phenol 0.547559081 6.924813e-01 #> f_phenol_to_anisole 0.000000000 1.000000e+00 #> sigma 1.706607296 3.322649e+00
endpoints(fit.1)
#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 6.894640e-11 +#> 6.227599e-01 3.772401e-01 1.000000e+00 3.773626e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 -#> anisole 103.784092 344.76329 +#> anisole 103.784093 344.76329 #>
# formation fraction from phenol to anisol is practically 1. As we cannot # fix formation fractions when using the ilr transformation, we can turn of # the sink in the model generation @@ -215,28 +215,28 @@ quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(fit.2)$bpar
#> Estimate se_notrans t value Pr(>t) Lower -#> T245_0 1.038550e+02 2.1623653027 48.028439 4.993108e-19 99.271020526 -#> k_T245 4.337042e-02 0.0018343666 23.643268 3.573555e-14 0.039650977 -#> k_phenol 4.050582e-01 0.1177237248 3.440752 1.679252e-03 0.218746585 -#> k_anisole 6.678741e-03 0.0006829745 9.778903 1.872894e-08 0.005377083 -#> f_T245_to_phenol 6.227599e-01 0.0342197865 18.198825 2.039410e-12 0.547975628 +#> T245_0 1.038550e+02 2.1623653066 48.028439 4.993108e-19 99.271020284 +#> k_T245 4.337042e-02 0.0018343666 23.643268 3.573556e-14 0.039650976 +#> k_phenol 4.050582e-01 0.1177237473 3.440752 1.679254e-03 0.218746587 +#> k_anisole 6.678742e-03 0.0006829745 9.778903 1.872894e-08 0.005377083 +#> f_T245_to_phenol 6.227599e-01 0.0342197875 18.198824 2.039411e-12 0.547975637 #> sigma 2.514628e+00 0.3790944250 6.633250 2.875782e-06 1.710983655 #> Upper -#> T245_0 108.43904097 +#> T245_0 108.43904074 #> k_T245 0.04743877 -#> k_phenol 0.75005577 +#> k_phenol 0.75005585 #> k_anisole 0.00829550 -#> f_T245_to_phenol 0.69212306 +#> f_T245_to_phenol 0.69212308 #> sigma 3.31827222
endpoints(fit.1)
#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 6.894640e-11 +#> 6.227599e-01 3.772401e-01 1.000000e+00 3.773626e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 -#> anisole 103.784092 344.76329 +#> anisole 103.784093 344.76329 #>
plot_sep(fit.2)
# }
diff --git a/docs/reference/mixed-1.png b/docs/reference/mixed-1.png index 05beffc9..28a376f4 100644 Binary files a/docs/reference/mixed-1.png and b/docs/reference/mixed-1.png differ diff --git a/docs/reference/mixed.html b/docs/reference/mixed.html index f5429f8b..23d955e3 100644 --- a/docs/reference/mixed.html +++ b/docs/reference/mixed.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 @@ -235,18 +235,16 @@ #> Status of individual fits: #> #> dataset -#> model 1 2 3 4 5 6 7 8 -#> DFOP-SFO OK OK OK OK OK C OK OK +#> model 1 2 3 4 5 6 7 8 +#> DFOP-SFO OK OK OK OK OK OK OK OK #> #> OK: No warnings -#> C: Optimisation did not converge: -#> iteration limit reached without convergence (10) #> #> Mean fitted parameters: #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 -#> 100.606304 -8.759216 -0.002001 -3.350539 -3.989549 +#> 100.674757 -8.761916 -0.004347 -3.348812 -3.986853 #> g_qlogis -#> -0.090353
plot(f_mixed) +#> -0.087392
plot(f_mixed)
# }
diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html index 7eca35de..c82da5dd 100644 --- a/docs/reference/mkin_long_to_wide.html +++ b/docs/reference/mkin_long_to_wide.html @@ -74,7 +74,7 @@ variable and several dependent variables as columns." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html index 5df8972f..15619fba 100644 --- a/docs/reference/mkin_wide_to_long.html +++ b/docs/reference/mkin_wide_to_long.html @@ -74,7 +74,7 @@ mkinfit." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 543ea68d..5111a9e0 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -75,7 +75,7 @@ provided by this package come as mkinds objects nevertheless." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkindsg.html b/docs/reference/mkindsg.html index 74d3a26c..003e5e8f 100644 --- a/docs/reference/mkindsg.html +++ b/docs/reference/mkindsg.html @@ -75,7 +75,7 @@ dataset if no data are supplied." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkinerrmin.html b/docs/reference/mkinerrmin.html index 161eadca..f22b4350 100644 --- a/docs/reference/mkinerrmin.html +++ b/docs/reference/mkinerrmin.html @@ -73,7 +73,7 @@ the chi-squared test as defined in the FOCUS kinetics report from 2006." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkinerrplot.html b/docs/reference/mkinerrplot.html index 2509e4c1..361ce79a 100644 --- a/docs/reference/mkinerrplot.html +++ b/docs/reference/mkinerrplot.html @@ -76,7 +76,7 @@ using the argument show_errplot = TRUE." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkinfit-1.png b/docs/reference/mkinfit-1.png index bbc0ccb6..de2a90a9 100644 Binary files a/docs/reference/mkinfit-1.png and b/docs/reference/mkinfit-1.png differ diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 4d8aeb40..180f2ee7 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -80,7 +80,7 @@ likelihood function." /> mkin - 1.0.0 + 1.0.3 @@ -431,10 +431,10 @@ doi: 10.3390/environments6 # Use shorthand notation for parent only degradation fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit) -
#> mkin version used for fitting: 1.0.0 +
#> mkin version used for fitting: 1.0.3 #> R version used for fitting: 4.0.3 -#> Date of fit: Wed Feb 3 17:28:58 2021 -#> Date of summary: Wed Feb 3 17:28:58 2021 +#> Date of fit: Mon Feb 15 13:43:26 2021 +#> Date of summary: Mon Feb 15 13:43:26 2021 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -476,10 +476,10 @@ doi: 10.3390/environments6 #> #> Parameter correlation: #> parent_0 log_alpha log_beta sigma -#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.758e-08 -#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.007e-07 -#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.568e-08 -#> sigma 4.758e-08 1.007e-07 8.568e-08 1.000e+00 +#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.772e-08 +#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.005e-07 +#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.541e-08 +#> sigma 4.772e-08 1.005e-07 8.541e-08 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -548,7 +548,7 @@ doi: 10.3390/environments6 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
parms(fit.tc)
#> parent_0 k_parent k_m1 f_parent_to_m1 sigma_low -#> 1.007343e+02 1.005562e-01 5.166712e-03 5.083933e-01 3.049884e-03 +#> 1.007343e+02 1.005562e-01 5.166712e-03 5.083933e-01 3.049883e-03 #> rsd_high #> 7.928118e-02
endpoints(fit.tc)
#> $ff @@ -575,9 +575,9 @@ doi: 10.3390/environments6 solution_type = "analytical")) }
#> test relative elapsed -#> 3 analytical 1.000 0.542 -#> 1 deSolve_compiled 1.812 0.982 -#> 2 eigen 2.234 1.211
# } +#> 3 analytical 1.000 0.550 +#> 1 deSolve_compiled 1.731 0.952 +#> 2 eigen 2.662 1.464
# } # Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO # \dontrun{ @@ -587,22 +587,21 @@ doi: 10.3390/environments6
#> Temporary DLL for differentials generated and loaded
fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE) # Again, we get a warning and try a more sophisticated error model fit.FOMC_SFO.tc <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE, error_model = "tc") -
#> Warning: Optimisation did not converge: -#> iteration limit reached without convergence (10)
# This model has a higher likelihood, but not significantly so +# This model has a higher likelihood, but not significantly so lrtest(fit.tc, fit.FOMC_SFO.tc)
#> Likelihood ratio test #> #> Model 1: FOMC_SFO with error model tc and fixed parameter(s) m1_0 #> Model 2: SFO_SFO with error model tc and fixed parameter(s) m1_0 #> #Df LogLik Df Chisq Pr(>Chisq) -#> 1 7 -64.870 -#> 2 6 -64.983 -1 0.2259 0.6346
# Also, the missing standard error for log_beta and the t-tests for alpha +#> 1 7 -64.829 +#> 2 6 -64.983 -1 0.3075 0.5792
# Also, the missing standard error for log_beta and the t-tests for alpha # and beta indicate overparameterisation summary(fit.FOMC_SFO.tc, data = FALSE) -
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful
#> mkin version used for fitting: 1.0.0 +
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful
#> mkin version used for fitting: 1.0.3 #> R version used for fitting: 4.0.3 -#> Date of fit: Wed Feb 3 17:29:09 2021 -#> Date of summary: Wed Feb 3 17:29:09 2021 +#> Date of fit: Mon Feb 15 13:43:38 2021 +#> Date of summary: Mon Feb 15 13:43:38 2021 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -611,12 +610,12 @@ doi: 10.3390/environments6 #> #> Model predictions using solution type deSolve #> -#> Fitted using 4273 model solutions performed in 3.195 s +#> Fitted using 3729 model solutions performed in 2.802 s #> #> Error model: Two-component variance function #> #> Error model algorithm: d_3 -#> Three-step fitting yielded a higher likelihood than direct fitting +#> Direct fitting and three-step fitting yield approximately the same likelihood #> #> Starting values for parameters to be optimised: #> value type @@ -642,72 +641,67 @@ doi: 10.3390/environments6 #> value type #> m1_0 0 state #> -#> -#> Warning(s): -#> Optimisation did not converge: -#> iteration limit reached without convergence (10) -#> #> Results: #> -#> AIC BIC logLik -#> 143.7396 155.2027 -64.86982 +#> AIC BIC logLik +#> 143.658 155.1211 -64.82902 #> #> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 1.016e+02 1.90600 97.7400 105.5000 -#> log_k_m1 -5.285e+00 0.09286 -5.4740 -5.0950 -#> f_parent_qlogis 6.482e-04 0.06164 -0.1251 0.1264 -#> log_alpha 5.467e+00 NaN NaN NaN -#> log_beta 7.750e+00 NaN NaN NaN -#> sigma_low 0.000e+00 NaN NaN NaN -#> rsd_high 7.989e-02 NaN NaN NaN +#> Estimate Std. Error Lower Upper +#> parent_0 101.600000 2.6400000 96.240000 107.000000 +#> log_k_m1 -5.284000 0.0929100 -5.474000 -5.095000 +#> f_parent_qlogis 0.001426 0.0767000 -0.155000 0.157800 +#> log_alpha 5.522000 0.0077320 5.506000 5.538000 +#> log_beta 7.806000 NaN NaN NaN +#> sigma_low 0.002488 0.0002431 0.001992 0.002984 +#> rsd_high 0.079210 0.0093280 0.060180 0.098230 #> #> Parameter correlation: -#> parent_0 log_k_m1 f_parent_qlogis log_alpha log_beta -#> parent_0 1.0000000 -0.0002167 -0.6060 NaN NaN -#> log_k_m1 -0.0002167 1.0000000 0.5474 NaN NaN -#> f_parent_qlogis -0.6060320 0.5474423 1.0000 NaN NaN -#> log_alpha NaN NaN NaN 1 NaN -#> log_beta NaN NaN NaN NaN 1 -#> sigma_low NaN NaN NaN NaN NaN -#> rsd_high NaN NaN NaN NaN NaN -#> sigma_low rsd_high -#> parent_0 NaN NaN -#> log_k_m1 NaN NaN -#> f_parent_qlogis NaN NaN -#> log_alpha NaN NaN -#> log_beta NaN NaN -#> sigma_low 1 NaN -#> rsd_high NaN 1 +#> parent_0 log_k_m1 f_parent_qlogis log_alpha log_beta +#> parent_0 1.000000 -0.095226 -0.76678 0.70544 NaN +#> log_k_m1 -0.095226 1.000000 0.51432 -0.14387 NaN +#> f_parent_qlogis -0.766780 0.514321 1.00000 -0.61396 NaN +#> log_alpha 0.705444 -0.143872 -0.61396 1.00000 NaN +#> log_beta NaN NaN NaN NaN 1 +#> sigma_low 0.016073 0.001586 0.01548 5.87007 NaN +#> rsd_high 0.006626 -0.011700 -0.05357 0.04849 NaN +#> sigma_low rsd_high +#> parent_0 0.016073 0.006626 +#> log_k_m1 0.001586 -0.011700 +#> f_parent_qlogis 0.015476 -0.053566 +#> log_alpha 5.870075 0.048487 +#> log_beta NaN NaN +#> sigma_low 1.000000 -0.652558 +#> rsd_high -0.652558 1.000000 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper -#> parent_0 1.016e+02 32.5400 7.812e-26 97.740000 1.055e+02 -#> k_m1 5.069e-03 10.0400 1.448e-11 0.004194 6.126e-03 -#> f_parent_to_m1 5.002e-01 20.7300 5.001e-20 0.468800 5.315e-01 -#> alpha 2.367e+02 0.6205 2.697e-01 NA NA -#> beta 2.322e+03 0.6114 2.727e-01 NA NA -#> sigma_low 0.000e+00 NaN NaN NaN NaN -#> rsd_high 7.989e-02 8.6630 4.393e-10 NaN NaN +#> parent_0 1.016e+02 32.7800 6.311e-26 9.624e+01 1.070e+02 +#> k_m1 5.072e-03 10.1200 1.216e-11 4.196e-03 6.130e-03 +#> f_parent_to_m1 5.004e-01 20.8300 4.317e-20 4.613e-01 5.394e-01 +#> alpha 2.502e+02 0.5624 2.889e-01 2.463e+02 2.542e+02 +#> beta 2.455e+03 0.5549 2.915e-01 NA NA +#> sigma_low 2.488e-03 0.4843 3.158e-01 1.992e-03 2.984e-03 +#> rsd_high 7.921e-02 8.4300 8.001e-10 6.018e-02 9.823e-02 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df -#> All data 6.782 5 14 -#> parent 7.142 3 6 -#> m1 4.639 2 8 +#> All data 6.781 5 14 +#> parent 7.141 3 6 +#> m1 4.640 2 8 #> #> Resulting formation fractions: #> ff -#> parent_m1 0.5002 -#> parent_sink 0.4998 +#> parent_m1 0.5004 +#> parent_sink 0.4996 #> #> Estimated disappearance times: -#> DT50 DT90 DT50back -#> parent 6.81 22.7 6.833 -#> m1 136.74 454.2 NA
+#> DT50 DT90 DT50back +#> parent 6.812 22.7 6.834 +#> m1 136.661 454.0 NA
# We can easily use starting parameters from the parent only fit (only for illustration) fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, quiet = TRUE, error_model = "tc") fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE, diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 43e5cc23..4ce9468a 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -78,7 +78,7 @@ mkinmod." /> mkin - 1.0.0 + 1.0.3
@@ -348,7 +348,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

parent = mkinsub("SFO", "m1", full_name = "Test compound"), m1 = mkinsub("SFO", full_name = "Metabolite M1"), name = "SFO_SFO", dll_dir = DLL_dir, unload = TRUE, overwrite = TRUE) -
#> Copied DLL from /tmp/Rtmp1BYo7R/file5c60502538f0.so to /home/jranke/.local/share/mkin/SFO_SFO.so
# Now we can save the model and restore it in a new session +
#> Copied DLL from /tmp/RtmpiJ2M4Z/filee097a4a94a921.so to /home/jranke/.local/share/mkin/SFO_SFO.so
# Now we can save the model and restore it in a new session saveRDS(SFO_SFO.2, file = "~/SFO_SFO.rds") # Terminate the R session here if you would like to check, and then do library(mkin) @@ -397,7 +397,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

#> }) #> return(predicted) #> } -#> <environment: 0x55555caa9ee0>
+#> <environment: 0x55555b0c2760>
# If we have several parallel metabolites # (compare tests/testthat/test_synthetic_data_for_UBA_2014.R) m_synth_DFOP_par <- mkinmod( diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png index dcf3e4b5..c9ed49eb 100644 Binary files a/docs/reference/mkinparplot-1.png and b/docs/reference/mkinparplot-1.png differ diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html index b4d11dcb..c298f5d2 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -73,7 +73,7 @@ mkinfit." /> mkin - 1.0.0 + 1.0.3
@@ -176,7 +176,8 @@ effect, namely to produce a plot.

phenol = mkinsub("SFO", to = c("anisole")), anisole = mkinsub("SFO"), use_of_ff = "max")
#> Temporary DLL for differentials generated and loaded
fit <- mkinfit(model, subset(mccall81_245T, soil == "Commerce"), quiet = TRUE) -
#> Warning: Observations with value of zero were removed from the data
mkinparplot(fit) +
#> Warning: Observations with value of zero were removed from the data
#> Warning: Optimisation did not converge: +#> false convergence (8)
mkinparplot(fit)
# }
diff --git a/docs/reference/mkinplot.html b/docs/reference/mkinplot.html index 1f0be544..b20a8c96 100644 --- a/docs/reference/mkinplot.html +++ b/docs/reference/mkinplot.html @@ -73,7 +73,7 @@ plot.mkinfit." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 035a21f9..25e26419 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -74,7 +74,7 @@ kinetic parameters and initial values for the state variables." /> mkin - 1.0.0 + 1.0.3 @@ -410,8 +410,8 @@ as these always return mapped output.

#> test relative elapsed #> 2 deSolve_compiled 1.0 0.005 #> 4 analytical 1.0 0.005 -#> 1 eigen 4.0 0.020 -#> 3 deSolve 44.6 0.223
+#> 1 eigen 4.4 0.022 +#> 3 deSolve 47.0 0.235
# \dontrun{ # Predict from a fitted model f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE) diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html index 69517f36..04ff15b8 100644 --- a/docs/reference/mkinresplot.html +++ b/docs/reference/mkinresplot.html @@ -75,7 +75,7 @@ argument show_residuals = TRUE." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/mmkin-1.png b/docs/reference/mmkin-1.png index cce02aed..0db3379f 100644 Binary files a/docs/reference/mmkin-1.png and b/docs/reference/mmkin-1.png differ diff --git a/docs/reference/mmkin-2.png b/docs/reference/mmkin-2.png index 4f2529fa..024a9892 100644 Binary files a/docs/reference/mmkin-2.png and b/docs/reference/mmkin-2.png differ diff --git a/docs/reference/mmkin-3.png b/docs/reference/mmkin-3.png index fb5d4470..a23d7cb9 100644 Binary files a/docs/reference/mmkin-3.png and b/docs/reference/mmkin-3.png differ diff --git a/docs/reference/mmkin-4.png b/docs/reference/mmkin-4.png index 4f11753e..89975db5 100644 Binary files a/docs/reference/mmkin-4.png and b/docs/reference/mmkin-4.png differ diff --git a/docs/reference/mmkin-5.png b/docs/reference/mmkin-5.png index 5d653de9..a2f34983 100644 Binary files a/docs/reference/mmkin-5.png and b/docs/reference/mmkin-5.png differ diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 77f815da..c9800fe7 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -75,7 +75,7 @@ datasets specified in its first two arguments." /> mkin - 1.0.0 + 1.0.3 @@ -234,19 +234,19 @@ plotting.

time_default
#> user system elapsed -#> 4.634 0.317 1.280
time_1 +#> 4.630 0.415 1.717
time_1
#> user system elapsed -#> 5.249 0.016 5.267
+#> 5.694 0.000 5.694
endpoints(fits.0[["SFO_lin", 2]])
#> $ff #> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340478 0.2659522 0.7505687 0.2494313 +#> 0.7340481 0.2659519 0.7505683 0.2494317 #> #> $distimes #> DT50 DT90 #> parent 0.877769 2.915885 -#> M1 2.325746 7.725960 -#> M2 33.720083 112.015691 +#> M1 2.325744 7.725956 +#> M2 33.720100 112.015749 #>
# plot.mkinfit handles rows or columns of mmkin result objects plot(fits.0[1, ]) @@ -273,12 +273,10 @@ plotting.

#> dataset #> model A B C D #> SFO OK OK OK OK -#> FOMC C OK OK OK +#> FOMC OK OK OK OK #> DFOP OK OK OK OK #> -#> OK: No warnings -#> C: Optimisation did not converge: -#> false convergence (8)
# We get false convergence for the FOMC fit to FOCUS_2006_A because this +#> OK: No warnings
# We get false convergence for the FOMC fit to FOCUS_2006_A because this # dataset is really SFO, and the FOMC fit is overparameterised stopCluster(cl) # } diff --git a/docs/reference/nafta-1.png b/docs/reference/nafta-1.png index 76d724f0..4f0d7833 100644 Binary files a/docs/reference/nafta-1.png and b/docs/reference/nafta-1.png differ diff --git a/docs/reference/nafta.html b/docs/reference/nafta.html index c6c1b173..29e03251 100644 --- a/docs/reference/nafta.html +++ b/docs/reference/nafta.html @@ -76,7 +76,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/nlme-1.png b/docs/reference/nlme-1.png index 82b952f7..728cc557 100644 Binary files a/docs/reference/nlme-1.png and b/docs/reference/nlme-1.png differ diff --git a/docs/reference/nlme-2.png b/docs/reference/nlme-2.png index 6bc121d1..e8167455 100644 Binary files a/docs/reference/nlme-2.png and b/docs/reference/nlme-2.png differ diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html index f9e68b7f..7b0c6a97 100644 --- a/docs/reference/nlme.html +++ b/docs/reference/nlme.html @@ -75,7 +75,7 @@ datasets. They are used internally by the nlme.mmkin() method." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/nlme.mmkin-1.png b/docs/reference/nlme.mmkin-1.png index 546a3731..9186c135 100644 Binary files a/docs/reference/nlme.mmkin-1.png and b/docs/reference/nlme.mmkin-1.png differ diff --git a/docs/reference/nlme.mmkin-2.png b/docs/reference/nlme.mmkin-2.png index 7b5b4ab0..d395fe02 100644 Binary files a/docs/reference/nlme.mmkin-2.png and b/docs/reference/nlme.mmkin-2.png differ diff --git a/docs/reference/nlme.mmkin-3.png b/docs/reference/nlme.mmkin-3.png index 7c04df4b..40518a59 100644 Binary files a/docs/reference/nlme.mmkin-3.png and b/docs/reference/nlme.mmkin-3.png differ diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html index 2e4f6337..189e34ef 100644 --- a/docs/reference/nlme.mmkin.html +++ b/docs/reference/nlme.mmkin.html @@ -74,7 +74,7 @@ have been obtained by fitting the same model to a list of datasets." /> mkin - 1.0.0 + 1.0.3 @@ -157,7 +157,7 @@ have been obtained by fitting the same model to a list of datasets.

data = "auto", fixed = lapply(as.list(names(mean_degparms(model))), function(el) eval(parse(text = paste(el, 1, sep = "~")))), - random = pdDiag(fixed), + random = pdDiag(fixed), groups, start = mean_degparms(model, random = TRUE), correlation = NULL, @@ -290,7 +290,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as anova(f_nlme_sfo, f_nlme_dfop)
#> Model df AIC BIC logLik Test L.Ratio p-value #> f_nlme_sfo 1 5 625.0539 637.5529 -307.5269 -#> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9268 <.0001
print(f_nlme_dfop) +#> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9269 <.0001
print(f_nlme_dfop)
#> Kinetic nonlinear mixed-effects model fit by maximum likelihood #> #> Structural model: @@ -318,7 +318,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as
endpoints(f_nlme_dfop)
#> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 -#> parent 10.79857 100.7937 30.34192 4.193937 43.85442 +#> parent 10.79857 100.7937 30.34193 4.193938 43.85443 #>
ds_2 <- lapply(experimental_data_for_UBA_2019[6:10], function(x) x$data[c("name", "time", "value")]) @@ -350,8 +350,8 @@ methods that will automatically work on 'nlme.mmkin' objects, such as
anova(f_nlme_dfop_sfo, f_nlme_sfo_sfo)
#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 -#> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 <.0001
+#> f_nlme_dfop_sfo 1 13 843.8548 884.6201 -408.9274 +#> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3273 <.0001
endpoints(f_nlme_sfo_sfo)
#> $ff #> parent_sink parent_A1 A1_sink @@ -364,12 +364,12 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #>
endpoints(f_nlme_dfop_sfo)
#> $ff #> parent_A1 parent_sink -#> 0.2768574 0.7231426 +#> 0.2768575 0.7231425 #> #> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 -#> parent 11.07091 104.6320 31.49738 4.462384 46.20825 -#> A1 162.30523 539.1663 NA NA NA +#> parent 11.07091 104.6320 31.49737 4.462384 46.20825 +#> A1 162.30492 539.1653 NA NA NA #>
if (length(findFunction("varConstProp")) > 0) { # tc error model for nlme available # Attempts to fit metabolite kinetics with the tc error model are possible, @@ -396,7 +396,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Fixed effects: #> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> parent_0 log_k1 log_k2 g_qlogis -#> 94.04775 -1.82340 -4.16715 0.05685 +#> 94.04774 -1.82340 -4.16716 0.05686 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) @@ -410,7 +410,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Formula: ~fitted(.) #> Parameter estimates: #> const prop -#> 2.23224114 0.01262341
+#> 2.23223147 0.01262395
f_2_obs <- update(f_2, error_model = "obs") f_nlme_sfo_sfo_obs <- nlme(f_2_obs["SFO-SFO", ]) print(f_nlme_sfo_sfo_obs) @@ -442,7 +442,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Formula: ~1 | name #> Parameter estimates: #> parent A1 -#> 1.0000000 0.2050003
f_nlme_dfop_sfo_obs <- nlme(f_2_obs["DFOP-SFO", ], +#> 1.0000000 0.2049995
f_nlme_dfop_sfo_obs <- nlme(f_2_obs["DFOP-SFO", ], control = list(pnlsMaxIter = 120, tolerance = 5e-4)) f_2_tc <- update(f_2, error_model = "tc") @@ -452,8 +452,8 @@ methods that will automatically work on 'nlme.mmkin' objects, such as anova(f_nlme_dfop_sfo, f_nlme_dfop_sfo_obs)
#> Model df AIC BIC logLik Test L.Ratio -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 -#> f_nlme_dfop_sfo_obs 2 14 817.5338 861.4350 -394.7669 1 vs 2 28.32089 +#> f_nlme_dfop_sfo 1 13 843.8548 884.6201 -408.9274 +#> f_nlme_dfop_sfo_obs 2 14 817.5338 861.4350 -394.7669 1 vs 2 28.32093 #> p-value #> f_nlme_dfop_sfo #> f_nlme_dfop_sfo_obs <.0001
diff --git a/docs/reference/nobs.mkinfit.html b/docs/reference/nobs.mkinfit.html index dff8a285..6b9948c3 100644 --- a/docs/reference/nobs.mkinfit.html +++ b/docs/reference/nobs.mkinfit.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3
diff --git a/docs/reference/parms.html b/docs/reference/parms.html index ab5888fa..e45d6a5c 100644 --- a/docs/reference/parms.html +++ b/docs/reference/parms.html @@ -74,7 +74,7 @@ considering the error structure that was assumed for the fit." /> mkin - 1.0.0 + 1.0.3 @@ -219,10 +219,10 @@ such matrices is returned.

#> #> $DFOP #> Dataset 7 -#> parent_0 91.058971597 +#> parent_0 91.058971589 #> k1 0.044946770 #> k2 0.002868336 -#> g 0.526942414 +#> g 0.526942415 #> sigma 2.221302196 #>
parms(fits)
#> $SFO @@ -233,17 +233,17 @@ such matrices is returned.

#> #> $FOMC #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458 +#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481459 #> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272 #> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224 #> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778 #> #> $DFOP #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 96.55213663 91.058971597 90.34509493 98.14858820 94.311323733 +#> parent_0 96.55213663 91.058971589 90.34509493 98.14858820 94.311323734 #> k1 0.21954588 0.044946770 0.41232288 0.31697588 0.080663857 #> k2 0.02957934 0.002868336 0.07581766 0.03260384 0.003425417 -#> g 0.44845068 0.526942414 0.66091967 0.65322767 0.342652880 +#> g 0.44845068 0.526942415 0.66091967 0.65322767 0.342652880 #> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831 #>
parms(fits, transformed = TRUE)
#> $SFO diff --git a/docs/reference/plot.mixed.mmkin.html b/docs/reference/plot.mixed.mmkin.html index 46303c44..4b72a308 100644 --- a/docs/reference/plot.mixed.mmkin.html +++ b/docs/reference/plot.mixed.mmkin.html @@ -72,7 +72,7 @@ mkin - 1.0.2 + 1.0.3
diff --git a/docs/reference/plot.mkinfit-2.png b/docs/reference/plot.mkinfit-2.png index 376c812f..a11d1680 100644 Binary files a/docs/reference/plot.mkinfit-2.png and b/docs/reference/plot.mkinfit-2.png differ diff --git a/docs/reference/plot.mkinfit-5.png b/docs/reference/plot.mkinfit-5.png index bc44de88..6631aa68 100644 Binary files a/docs/reference/plot.mkinfit-5.png and b/docs/reference/plot.mkinfit-5.png differ diff --git a/docs/reference/plot.mkinfit-6.png b/docs/reference/plot.mkinfit-6.png index eb8cbd92..946b20c5 100644 Binary files a/docs/reference/plot.mkinfit-6.png and b/docs/reference/plot.mkinfit-6.png differ diff --git a/docs/reference/plot.mkinfit-7.png b/docs/reference/plot.mkinfit-7.png index 92a664f4..10807ea8 100644 Binary files a/docs/reference/plot.mkinfit-7.png and b/docs/reference/plot.mkinfit-7.png differ diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 1be0f9af..b80c672d 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -74,7 +74,7 @@ observed data together with the solution of the fitted model." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/plot.mmkin-1.png b/docs/reference/plot.mmkin-1.png index f12b7907..647dfb8a 100644 Binary files a/docs/reference/plot.mmkin-1.png and b/docs/reference/plot.mmkin-1.png differ diff --git a/docs/reference/plot.mmkin-2.png b/docs/reference/plot.mmkin-2.png index e3127554..1bc1c9db 100644 Binary files a/docs/reference/plot.mmkin-2.png and b/docs/reference/plot.mmkin-2.png differ diff --git a/docs/reference/plot.mmkin-3.png b/docs/reference/plot.mmkin-3.png index 5448976e..50d6ffac 100644 Binary files a/docs/reference/plot.mmkin-3.png and b/docs/reference/plot.mmkin-3.png differ diff --git a/docs/reference/plot.mmkin-4.png b/docs/reference/plot.mmkin-4.png index 9a25fc50..e049fa16 100644 Binary files a/docs/reference/plot.mmkin-4.png and b/docs/reference/plot.mmkin-4.png differ diff --git a/docs/reference/plot.mmkin-5.png b/docs/reference/plot.mmkin-5.png index 82b422b5..2421995b 100644 Binary files a/docs/reference/plot.mmkin-5.png and b/docs/reference/plot.mmkin-5.png differ diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index 4e9836ec..20f9033d 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -76,7 +76,7 @@ the fit of at least one model to the same dataset is shown." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/plot.nafta.html b/docs/reference/plot.nafta.html index 29cc984a..544ee5eb 100644 --- a/docs/reference/plot.nafta.html +++ b/docs/reference/plot.nafta.html @@ -73,7 +73,7 @@ function (SFO, then IORE, then DFOP)." /> mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index 2bfeb582..864c4ff9 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -79,7 +79,7 @@ below to see their documentation. mkin - 1.0.0 + 1.0.3 diff --git a/docs/reference/residuals.mkinfit.html b/docs/reference/residuals.mkinfit.html index db7c1a40..c5c2dcaf 100644 --- a/docs/reference/residuals.mkinfit.html +++ b/docs/reference/residuals.mkinfit.html @@ -72,7 +72,7 @@ mkin - 1.0.0 + 1.0.3 @@ -175,7 +175,7 @@ standard deviation obtained from the fitted error model?

#> [1] 0.09726374 -0.13912142 -0.15351210 0.73388322 -0.08657004 -0.93204702 #> [7] -0.03269080 1.45347823 -0.88423697
residuals(f, standardized = TRUE)
#> [1] 0.13969917 -0.19981904 -0.22048826 1.05407091 -0.12433989 -1.33869208 -#> [7] -0.04695354 2.08761977 -1.27002287
+#> [7] -0.04695355 2.08761977 -1.27002287 @@ -186,15 +186,15 @@
endpoints(fit)
#> $ff #> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink -#> 0.3809620 0.1954665 0.4235715 0.0000000 0.4479662 0.5520338 +#> 0.3809620 0.1954667 0.4235713 0.0000000 0.4479619 0.5520381 #> #> $distimes #> DT50 DT90 #> parent 13.95078 46.34350 -#> A1 49.75343 165.27731 -#> B1 37.26912 123.80533 -#> C1 11.23131 37.30959 -#> A2 28.50569 94.69386 +#> A1 49.75342 165.27728 +#> B1 37.26908 123.80520 +#> C1 11.23131 37.30961 +#> A2 28.50624 94.69567 #>
# } # Compare with the results obtained in the original publication print(schaefer07_complex_results) diff --git a/docs/reference/sigma_twocomp.html b/docs/reference/sigma_twocomp.html index 46ca562a..397582f0 100644 --- a/docs/reference/sigma_twocomp.html +++ b/docs/reference/sigma_twocomp.html @@ -73,7 +73,7 @@ dependence of the measured value \(y\):" /> mkin - 1.0.0 + 1.0.3
@@ -188,6 +188,10 @@ Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry 24(11), 1895-1898.

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 +.

Examples

times <- c(0, 1, 3, 7, 14, 28, 60, 90, 120) diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 7be427bf..67a50216 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -76,7 +76,7 @@ values." /> mkin - 1.0.0 + 1.0.3
@@ -236,17 +236,17 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,

Examples

summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE)) -
#> mkin version used for fitting: 1.0.0 +
#> mkin version used for fitting: 1.0.3 #> R version used for fitting: 4.0.3 -#> Date of fit: Wed Feb 3 17:32:02 2021 -#> Date of summary: Wed Feb 3 17:32:02 2021 +#> Date of fit: Mon Feb 15 13:46:11 2021 +#> Date of summary: Mon Feb 15 13:46:11 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.029 s #> #> Error model: Constant variance #> diff --git a/docs/reference/summary.nlme.mmkin.html b/docs/reference/summary.nlme.mmkin.html index bc60b53e..d6840425 100644 --- a/docs/reference/summary.nlme.mmkin.html +++ b/docs/reference/summary.nlme.mmkin.html @@ -76,7 +76,7 @@ endpoints such as formation fractions and DT50 values. Optionally mkin - 1.0.0 + 1.0.3
@@ -264,11 +264,11 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

#> Warning: Optimisation did not converge: #> iteration limit reached without convergence (10)
f_nlme <- nlme(f_mmkin)
#> Warning: Iteration 4, LME step: nlminb() did not converge (code = 1). PORT message: false convergence (8)
summary(f_nlme, data = TRUE) -
#> nlme version used for fitting: 3.1.151 -#> mkin version used for pre-fitting: 1.0.0 +
#> nlme version used for fitting: 3.1.152 +#> mkin version used for pre-fitting: 1.0.3 #> R version used for fitting: 4.0.3 -#> Date of fit: Wed Feb 3 17:32:05 2021 -#> Date of summary: Wed Feb 3 17:32:05 2021 +#> Date of fit: Mon Feb 15 13:46:13 2021 +#> Date of summary: Mon Feb 15 13:46:13 2021 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -278,7 +278,7 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

#> #> Model predictions using solution type analytical #> -#> Fitted in 0.526 s using 4 iterations +#> Fitted in 0.553 s using 4 iterations #> #> Variance model: Two-component variance function #> @@ -307,19 +307,19 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

#> Formula: list(parent_0 ~ 1, log_k_parent ~ 1) #> Level: ds #> Structure: Diagonal -#> parent_0 log_k_parent Residual -#> StdDev: 6.91e-05 0.5863 1 +#> parent_0 log_k_parent Residual +#> StdDev: 6.924e-05 0.5863 1 #> #> Variance function: #> Structure: Constant plus proportion of variance covariate #> Formula: ~fitted(.) #> Parameter estimates: #> const prop -#> 0.0001206605 0.0789967776 +#> 0.0001208853 0.0789968036 #> #> Backtransformed parameters with asymmetric confidence intervals: #> lower est. upper -#> parent_0 99.370883 101.59243 103.81398 +#> parent_0 99.370882 101.59243 103.81398 #> k_parent 0.006923 0.01168 0.01972 #> #> Estimated disappearance times: @@ -330,68 +330,68 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

#> ds name time observed predicted residual std standardized #> ds 1 parent 0 104.1 101.592 2.50757 8.0255 0.312451 #> ds 1 parent 0 105.0 101.592 3.40757 8.0255 0.424594 -#> ds 1 parent 1 98.5 100.796 -2.29571 7.9625 -0.288314 +#> ds 1 parent 1 98.5 100.796 -2.29571 7.9625 -0.288313 #> ds 1 parent 1 96.1 100.796 -4.69571 7.9625 -0.589725 #> ds 1 parent 3 101.9 99.221 2.67904 7.8381 0.341796 -#> ds 1 parent 3 85.2 99.221 -14.02096 7.8381 -1.788813 +#> ds 1 parent 3 85.2 99.221 -14.02096 7.8381 -1.788812 #> ds 1 parent 7 99.1 96.145 2.95512 7.5951 0.389081 #> ds 1 parent 7 93.0 96.145 -3.14488 7.5951 -0.414065 -#> ds 1 parent 14 88.1 90.989 -2.88944 7.1879 -0.401988 +#> ds 1 parent 14 88.1 90.989 -2.88944 7.1879 -0.401987 #> ds 1 parent 14 84.1 90.989 -6.88944 7.1879 -0.958480 #> ds 1 parent 28 80.2 81.493 -1.29305 6.4377 -0.200857 -#> ds 1 parent 28 91.3 81.493 9.80695 6.4377 1.523365 +#> ds 1 parent 28 91.3 81.493 9.80695 6.4377 1.523364 #> ds 1 parent 60 65.1 63.344 1.75642 5.0039 0.351008 #> ds 1 parent 60 65.8 63.344 2.45642 5.0039 0.490898 -#> ds 1 parent 90 47.8 50.018 -2.21764 3.9512 -0.561253 +#> ds 1 parent 90 47.8 50.018 -2.21764 3.9512 -0.561252 #> ds 1 parent 90 53.5 50.018 3.48236 3.9512 0.881335 #> ds 1 parent 120 37.6 39.495 -1.89515 3.1200 -0.607423 #> ds 1 parent 120 39.3 39.495 -0.19515 3.1200 -0.062549 -#> ds 2 parent 0 107.9 101.592 6.30757 8.0255 0.785944 +#> ds 2 parent 0 107.9 101.592 6.30757 8.0255 0.785943 #> ds 2 parent 0 102.1 101.592 0.50757 8.0255 0.063245 -#> ds 2 parent 1 103.8 100.058 3.74159 7.9043 0.473362 -#> ds 2 parent 1 108.6 100.058 8.54159 7.9043 1.080627 +#> ds 2 parent 1 103.8 100.058 3.74159 7.9043 0.473361 +#> ds 2 parent 1 108.6 100.058 8.54159 7.9043 1.080626 #> ds 2 parent 3 91.0 97.060 -6.05952 7.6674 -0.790297 #> ds 2 parent 3 84.9 97.060 -12.15952 7.6674 -1.585874 -#> ds 2 parent 7 79.3 91.329 -12.02867 7.2147 -1.667252 -#> ds 2 parent 7 100.9 91.329 9.57133 7.2147 1.326648 +#> ds 2 parent 7 79.3 91.329 -12.02867 7.2147 -1.667251 +#> ds 2 parent 7 100.9 91.329 9.57133 7.2147 1.326647 #> ds 2 parent 14 77.3 82.102 -4.80185 6.4858 -0.740366 #> ds 2 parent 14 83.5 82.102 1.39815 6.4858 0.215571 #> ds 2 parent 28 66.8 66.351 0.44945 5.2415 0.085748 #> ds 2 parent 28 63.3 66.351 -3.05055 5.2415 -0.582002 #> ds 2 parent 60 40.8 40.775 0.02474 3.2211 0.007679 -#> ds 2 parent 60 44.8 40.775 4.02474 3.2211 1.249486 +#> ds 2 parent 60 44.8 40.775 4.02474 3.2211 1.249485 #> ds 2 parent 90 27.8 25.832 1.96762 2.0407 0.964198 #> ds 2 parent 90 27.0 25.832 1.16762 2.0407 0.572171 -#> ds 2 parent 120 15.2 16.366 -1.16561 1.2928 -0.901596 +#> ds 2 parent 120 15.2 16.366 -1.16561 1.2928 -0.901595 #> ds 2 parent 120 15.5 16.366 -0.86561 1.2928 -0.669547 #> ds 3 parent 0 97.7 101.592 -3.89243 8.0255 -0.485009 -#> ds 3 parent 0 88.2 101.592 -13.39243 8.0255 -1.668740 -#> ds 3 parent 1 109.9 99.218 10.68196 7.8379 1.362859 +#> ds 3 parent 0 88.2 101.592 -13.39243 8.0255 -1.668739 +#> ds 3 parent 1 109.9 99.218 10.68196 7.8379 1.362858 #> ds 3 parent 1 97.8 99.218 -1.41804 7.8379 -0.180921 #> ds 3 parent 3 100.5 94.634 5.86555 7.4758 0.784603 #> ds 3 parent 3 77.4 94.634 -17.23445 7.4758 -2.305360 -#> ds 3 parent 7 78.3 86.093 -7.79273 6.8010 -1.145813 -#> ds 3 parent 7 90.3 86.093 4.20727 6.8010 0.618621 -#> ds 3 parent 14 76.0 72.958 3.04222 5.7634 0.527849 -#> ds 3 parent 14 79.1 72.958 6.14222 5.7634 1.065723 +#> ds 3 parent 7 78.3 86.093 -7.79273 6.8011 -1.145813 +#> ds 3 parent 7 90.3 86.093 4.20727 6.8011 0.618620 +#> ds 3 parent 14 76.0 72.958 3.04222 5.7634 0.527848 +#> ds 3 parent 14 79.1 72.958 6.14222 5.7634 1.065722 #> ds 3 parent 28 46.0 52.394 -6.39404 4.1390 -1.544842 #> ds 3 parent 28 53.4 52.394 1.00596 4.1390 0.243046 #> ds 3 parent 60 25.1 24.582 0.51786 1.9419 0.266676 -#> ds 3 parent 60 21.4 24.582 -3.18214 1.9419 -1.638665 -#> ds 3 parent 90 11.0 12.092 -1.09202 0.9552 -1.143200 -#> ds 3 parent 90 14.2 12.092 2.10798 0.9552 2.206777 +#> ds 3 parent 60 21.4 24.582 -3.18214 1.9419 -1.638664 +#> ds 3 parent 90 11.0 12.092 -1.09202 0.9552 -1.143199 +#> ds 3 parent 90 14.2 12.092 2.10798 0.9552 2.206776 #> ds 3 parent 120 5.8 5.948 -0.14810 0.4699 -0.315178 #> ds 3 parent 120 6.1 5.948 0.15190 0.4699 0.323282 #> ds 4 parent 0 95.3 101.592 -6.29243 8.0255 -0.784057 -#> ds 4 parent 0 102.0 101.592 0.40757 8.0255 0.050785 +#> ds 4 parent 0 102.0 101.592 0.40757 8.0255 0.050784 #> ds 4 parent 1 104.4 101.125 3.27549 7.9885 0.410025 #> ds 4 parent 1 105.4 101.125 4.27549 7.9885 0.535205 #> ds 4 parent 3 113.7 100.195 13.50487 7.9151 1.706218 -#> ds 4 parent 3 82.3 100.195 -17.89513 7.9151 -2.260887 +#> ds 4 parent 3 82.3 100.195 -17.89513 7.9151 -2.260886 #> ds 4 parent 7 98.1 98.362 -0.26190 7.7703 -0.033706 #> ds 4 parent 7 87.8 98.362 -10.56190 7.7703 -1.359270 #> ds 4 parent 14 97.9 95.234 2.66590 7.5232 0.354357 -#> ds 4 parent 14 104.8 95.234 9.56590 7.5232 1.271522 +#> ds 4 parent 14 104.8 95.234 9.56590 7.5232 1.271521 #> ds 4 parent 28 85.0 89.274 -4.27372 7.0523 -0.606001 #> ds 4 parent 28 77.2 89.274 -12.07372 7.0523 -1.712017 #> ds 4 parent 60 82.2 77.013 5.18661 6.0838 0.852526 @@ -400,18 +400,18 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

#> ds 4 parent 90 61.7 67.053 -5.35308 5.2970 -1.010591 #> ds 4 parent 120 60.0 58.381 1.61905 4.6119 0.351058 #> ds 4 parent 120 56.4 58.381 -1.98095 4.6119 -0.429530 -#> ds 5 parent 0 92.6 101.592 -8.99243 8.0255 -1.120486 +#> ds 5 parent 0 92.6 101.592 -8.99243 8.0255 -1.120485 #> ds 5 parent 0 116.5 101.592 14.90757 8.0255 1.857531 #> ds 5 parent 1 108.0 99.914 8.08560 7.8929 1.024413 -#> ds 5 parent 1 104.9 99.914 4.98560 7.8929 0.631656 +#> ds 5 parent 1 104.9 99.914 4.98560 7.8929 0.631655 #> ds 5 parent 3 100.5 96.641 3.85898 7.6343 0.505477 -#> ds 5 parent 3 89.5 96.641 -7.14102 7.6343 -0.935383 +#> ds 5 parent 3 89.5 96.641 -7.14102 7.6343 -0.935382 #> ds 5 parent 7 91.7 90.412 1.28752 7.1423 0.180267 -#> ds 5 parent 7 95.1 90.412 4.68752 7.1423 0.656305 -#> ds 5 parent 14 82.2 80.463 1.73715 6.3563 0.273296 +#> ds 5 parent 7 95.1 90.412 4.68752 7.1423 0.656304 +#> ds 5 parent 14 82.2 80.463 1.73715 6.3563 0.273295 #> ds 5 parent 14 84.5 80.463 4.03715 6.3563 0.635141 #> ds 5 parent 28 60.5 63.728 -3.22788 5.0343 -0.641178 -#> ds 5 parent 28 72.8 63.728 9.07212 5.0343 1.802063 +#> ds 5 parent 28 72.8 63.728 9.07212 5.0343 1.802062 #> ds 5 parent 60 38.3 37.399 0.90061 2.9544 0.304835 #> ds 5 parent 60 40.7 37.399 3.30061 2.9544 1.117174 #> ds 5 parent 90 22.5 22.692 -0.19165 1.7926 -0.106913 diff --git a/docs/reference/synthetic_data_for_UBA_2014-1.png b/docs/reference/synthetic_data_for_UBA_2014-1.png index 4f11753e..89975db5 100644 Binary files a/docs/reference/synthetic_data_for_UBA_2014-1.png and b/docs/reference/synthetic_data_for_UBA_2014-1.png differ diff --git a/docs/reference/synthetic_data_for_UBA_2014.html b/docs/reference/synthetic_data_for_UBA_2014.html index af8bdcb2..c37b986e 100644 --- a/docs/reference/synthetic_data_for_UBA_2014.html +++ b/docs/reference/synthetic_data_for_UBA_2014.html @@ -87,7 +87,7 @@ Compare also the code in the example section to see the degradation models." /> mkin - 1.0.0 + 1.0.3
@@ -297,10 +297,10 @@ Compare also the code in the example section to see the degradation models." /> quiet = TRUE) plot_sep(fit)
summary(fit) -
#> mkin version used for fitting: 1.0.0 +
#> mkin version used for fitting: 1.0.3 #> R version used for fitting: 4.0.3 -#> Date of fit: Wed Feb 3 17:32:06 2021 -#> Date of summary: Wed Feb 3 17:32:06 2021 +#> Date of fit: Mon Feb 15 13:46:15 2021 +#> Date of summary: Mon Feb 15 13:46:15 2021 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -309,7 +309,7 @@ Compare also the code in the example section to see the degradation models." /> #> #> Model predictions using solution type deSolve #> -#> Fitted using 822 model solutions performed in 0.645 s +#> Fitted using 833 model solutions performed in 0.665 s #> #> Error model: Constant variance #> @@ -361,15 +361,15 @@ Compare also the code in the example section to see the degradation models." /> #> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01 #> f_parent_qlogis -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00 #> f_M1_qlogis 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01 -#> sigma -7.941e-08 -9.143e-09 -1.268e-08 5.947e-08 5.657e-08 +#> sigma -2.900e-08 -8.030e-09 -2.741e-08 3.938e-08 -2.681e-08 #> f_M1_qlogis sigma -#> parent_0 1.614e-01 -7.941e-08 -#> log_k_parent 4.102e-01 -9.143e-09 -#> log_k_M1 -8.109e-01 -1.268e-08 -#> log_k_M2 5.419e-01 5.947e-08 -#> f_parent_qlogis -8.605e-01 5.657e-08 -#> f_M1_qlogis 1.000e+00 -2.382e-10 -#> sigma -2.382e-10 1.000e+00 +#> parent_0 1.614e-01 -2.900e-08 +#> log_k_parent 4.102e-01 -8.030e-09 +#> log_k_M1 -8.109e-01 -2.741e-08 +#> log_k_M2 5.419e-01 3.938e-08 +#> f_parent_qlogis -8.605e-01 -2.681e-08 +#> f_M1_qlogis 1.000e+00 4.971e-08 +#> sigma 4.971e-08 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -416,7 +416,7 @@ Compare also the code in the example section to see the degradation models." /> #> 7 parent 0.3 5.772e-01 -0.27717 #> 14 parent 3.5 3.264e-03 3.49674 #> 28 parent 3.2 1.045e-07 3.20000 -#> 90 parent 0.6 9.532e-10 0.60000 +#> 90 parent 0.6 9.530e-10 0.60000 #> 120 parent 3.5 -5.940e-10 3.50000 #> 1 M1 36.4 3.479e+01 1.61088 #> 1 M1 37.4 3.479e+01 2.61088 @@ -427,7 +427,7 @@ Compare also the code in the example section to see the degradation models." /> #> 14 M1 5.8 1.995e+00 3.80469 #> 14 M1 1.2 1.995e+00 -0.79531 #> 60 M1 0.5 2.111e-06 0.50000 -#> 90 M1 3.2 -9.671e-10 3.20000 +#> 90 M1 3.2 -9.670e-10 3.20000 #> 120 M1 1.5 7.670e-10 1.50000 #> 120 M1 0.6 7.670e-10 0.60000 #> 1 M2 4.8 4.455e+00 0.34517 diff --git a/docs/reference/test_data_from_UBA_2014-1.png b/docs/reference/test_data_from_UBA_2014-1.png index 168103ee..7bf0bd0f 100644 Binary files a/docs/reference/test_data_from_UBA_2014-1.png and b/docs/reference/test_data_from_UBA_2014-1.png differ diff --git a/docs/reference/test_data_from_UBA_2014-2.png b/docs/reference/test_data_from_UBA_2014-2.png index 68288aed..fc1f77e0 100644 Binary files a/docs/reference/test_data_from_UBA_2014-2.png and b/docs/reference/test_data_from_UBA_2014-2.png differ diff --git a/docs/reference/test_data_from_UBA_2014.html b/docs/reference/test_data_from_UBA_2014.html index eeaef9e0..c0056d45 100644 --- a/docs/reference/test_data_from_UBA_2014.html +++ b/docs/reference/test_data_from_UBA_2014.html @@ -73,7 +73,7 @@ mkin - 1.0.0 + 1.0.3
@@ -203,25 +203,25 @@
#> Warning: Observations with value of zero were removed from the data
plot_sep(f_soil, lpos = c("topright", "topright", "topright", "bottomright"))
summary(f_soil)$bpar
#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 76.55425649 0.859186399 89.1008710 1.113861e-26 74.755959406 +#> parent_0 76.55425650 0.859186399 89.1008710 1.113861e-26 74.755959418 #> k_parent 0.12081956 0.004601918 26.2541722 1.077359e-16 0.111561575 -#> k_M1 0.84258614 0.806159820 1.0451850 1.545267e-01 0.113779670 -#> k_M2 0.04210880 0.017083035 2.4649483 1.170188e-02 0.018013857 -#> k_M3 0.01122918 0.007245855 1.5497385 6.885052e-02 0.002909431 -#> f_parent_to_M1 0.32240200 0.240783909 1.3389682 9.819073e-02 NA -#> f_parent_to_M2 0.16099855 0.033691953 4.7785463 6.531137e-05 NA -#> f_M1_to_M3 0.27921507 0.269423745 1.0363417 1.565266e-01 0.022978220 -#> f_M2_to_M3 0.55641253 0.595119954 0.9349586 1.807707e-01 0.008002509 +#> k_M1 0.84258615 0.806160102 1.0451846 1.545268e-01 0.113779609 +#> k_M2 0.04210880 0.017083034 2.4649483 1.170188e-02 0.018013857 +#> k_M3 0.01122918 0.007245856 1.5497385 6.885052e-02 0.002909431 +#> f_parent_to_M1 0.32240200 0.240783943 1.3389680 9.819076e-02 NA +#> f_parent_to_M2 0.16099855 0.033691952 4.7785464 6.531136e-05 NA +#> f_M1_to_M3 0.27921507 0.269423780 1.0363416 1.565267e-01 0.022978205 +#> f_M2_to_M3 0.55641252 0.595119966 0.9349586 1.807707e-01 0.008002509 #> sigma 1.14005399 0.149696423 7.6157731 1.727024e-07 0.826735778 #> Upper -#> parent_0 78.35255357 +#> parent_0 78.35255358 #> k_parent 0.13084582 -#> k_M1 6.23970352 +#> k_M1 6.23970702 #> k_M2 0.09843260 #> k_M3 0.04333992 #> f_parent_to_M1 NA #> f_parent_to_M2 NA -#> f_M1_to_M3 0.86450768 +#> f_M1_to_M3 0.86450775 #> f_M2_to_M3 0.99489895 #> sigma 1.45337221
mkinerrmin(f_soil)
#> err.min n.optim df diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index e2cb876b..c3c756f6 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -77,7 +77,7 @@ the ilr transformation is used." /> mkin - 1.0.1 + 1.0.3
@@ -259,13 +259,13 @@ This is no problem for the internal use in mkinfit.fit.2.s <- summary(fit.2) print(fit.2.s$par, 3)
#> Estimate Std. Error Lower Upper -#> parent_0 99.59849 1.57022 96.40385 1.03e+02 +#> parent_0 99.59848 1.57022 96.40384 1.03e+02 #> k_parent_sink 0.04792 0.00365 0.04049 5.54e-02 #> k_parent_m1 0.05078 0.00205 0.04661 5.49e-02 #> k_m1_sink 0.00526 0.00070 0.00384 6.69e-03 #> sigma 3.12550 0.35852 2.39609 3.85e+00
print(fit.2.s$bpar, 3)
#> Estimate se_notrans t value Pr(>t) Lower Upper -#> parent_0 99.59849 1.57022 63.43 2.30e-36 96.40385 1.03e+02 +#> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 1.03e+02 #> k_parent_sink 0.04792 0.00365 13.11 6.13e-15 0.04049 5.54e-02 #> k_parent_m1 0.05078 0.00205 24.80 3.27e-23 0.04661 5.49e-02 #> k_m1_sink 0.00526 0.00070 7.51 6.16e-09 0.00384 6.69e-03 diff --git a/docs/reference/update.mkinfit.html b/docs/reference/update.mkinfit.html index f7149d84..09050e53 100644 --- a/docs/reference/update.mkinfit.html +++ b/docs/reference/update.mkinfit.html @@ -75,7 +75,7 @@ override these starting values." /> mkin - 1.0.0 + 1.0.3
diff --git a/man/sigma_twocomp.Rd b/man/sigma_twocomp.Rd index d205a2f7..e93254a5 100644 --- a/man/sigma_twocomp.Rd +++ b/man/sigma_twocomp.Rd @@ -59,4 +59,8 @@ Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry 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. \emph{Environments} 6(12) 124 +\doi{10.3390/environments6120124}. } diff --git a/test.log b/test.log index 18f1a89f..80b64269 100644 --- a/test.log +++ b/test.log @@ -28,10 +28,10 @@ Testing mkin ✔ | 4 | Summary [0.1 s] ✔ | 1 | Summaries of old mkinfit objects ✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2 s] -✔ | 9 | Hypothesis tests [8.2 s] +✔ | 9 | Hypothesis tests [8.3 s] ✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.5 s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 41.0 s +Duration: 40.9 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 174 ] diff --git a/vignettes/FOCUS_D.html b/vignettes/FOCUS_D.html index 8ebd1047..f1f078db 100644 --- a/vignettes/FOCUS_D.html +++ b/vignettes/FOCUS_D.html @@ -11,10 +11,22 @@ - Example evaluation of FOCUS Example Dataset D + - - - - - - + @@ -215,7 +253,7 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }

Calculation of time weighted average concentrations with mkin

Johannes Ranke

-

2020-10-08

+

Last change 18 September 2019 (rebuilt 2021-02-15)

@@ -251,9 +289,9 @@ code > span.er { color: #a61717; background-color: #e3d2d2; } \frac{1}{k_1} \left( 1 - e^{- k_1 t_b} \right) + \frac{e^{- k_1 t_b}}{k_2} \left( 1 - e^{- k_2 (t - t_b)} \right) \right) \]

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 max_twa_parent() function. If the same is needed for metabolites, the function pfm::max_twa() from the ‘pfm’ package can be used.

-
+
-

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.

diff --git a/vignettes/twa.rmd b/vignettes/twa.rmd index 6f283eb2..52baf8aa 100644 --- a/vignettes/twa.rmd +++ b/vignettes/twa.rmd @@ -1,7 +1,7 @@ --- title: Calculation of time weighted average concentrations with mkin author: Johannes Ranke -date: "`r Sys.Date()`" +date: Last change 18 September 2019 (rebuilt `r Sys.Date()`) bibliography: references.bib output: rmarkdown::html_vignette vignette: > diff --git a/vignettes/web_only/FOCUS_Z.html b/vignettes/web_only/FOCUS_Z.html index e8e6e2b4..035b8f84 100644 --- a/vignettes/web_only/FOCUS_Z.html +++ b/vignettes/web_only/FOCUS_Z.html @@ -11,10 +11,22 @@ - Example evaluation of FOCUS dataset Z + + + + + + +