From 91c5db736a4d3f2290a0cc5698fb4e35ae7bda59 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 18 May 2022 21:26:17 +0200 Subject: Remove outdated comment in FOCUS L vignette, update docs This also adds the first benchmark results obtained on my laptop system --- docs/404.html | 2 +- docs/articles/FOCUS_D.html | 22 +- docs/articles/FOCUS_L.html | 184 +++++---- .../figure-html/unnamed-chunk-6-1.png | Bin 36101 -> 36120 bytes docs/articles/index.html | 2 +- docs/articles/mkin.html | 4 +- .../mkin_files/figure-html/unnamed-chunk-2-1.png | Bin 90167 -> 90169 bytes docs/articles/twa.html | 4 +- docs/articles/web_only/FOCUS_Z.html | 50 +-- .../figure-html/FOCUS_2006_Z_fits_10-1.png | Bin 105896 -> 105896 bytes .../figure-html/FOCUS_2006_Z_fits_11-1.png | Bin 104793 -> 104797 bytes .../figure-html/FOCUS_2006_Z_fits_11a-1.png | Bin 75230 -> 75232 bytes .../figure-html/FOCUS_2006_Z_fits_11b-1.png | Bin 36314 -> 36302 bytes .../figure-html/FOCUS_2006_Z_fits_5-1.png | Bin 80373 -> 80380 bytes .../figure-html/FOCUS_2006_Z_fits_6-1.png | Bin 105210 -> 105229 bytes .../figure-html/FOCUS_2006_Z_fits_9-1.png | Bin 88801 -> 88797 bytes docs/articles/web_only/NAFTA_examples.html | 154 ++++---- .../NAFTA_examples_files/figure-html/p10-1.png | Bin 79758 -> 79762 bytes .../NAFTA_examples_files/figure-html/p15a-1.png | Bin 76925 -> 76938 bytes .../NAFTA_examples_files/figure-html/p15b-1.png | Bin 78968 -> 78977 bytes .../NAFTA_examples_files/figure-html/p5b-1.png | Bin 80721 -> 80721 bytes .../NAFTA_examples_files/figure-html/p6-1.png | Bin 83052 -> 83052 bytes .../NAFTA_examples_files/figure-html/p7-1.png | Bin 102568 -> 102570 bytes docs/articles/web_only/benchmarks.html | 145 ++++--- docs/articles/web_only/compiled_models.html | 30 +- docs/articles/web_only/dimethenamid_2018.html | 93 +++-- docs/articles/web_only/mkin_benchmarks.rda | Bin 0 -> 1273 bytes docs/authors.html | 2 +- docs/index.html | 25 +- docs/news/index.html | 58 ++- docs/pkgdown.yml | 4 +- docs/reference/AIC.mmkin.html | 10 +- docs/reference/CAKE_export.html | 2 +- docs/reference/D24_2014.html | 2 +- docs/reference/DFOP.solution.html | 2 +- docs/reference/Extract.mmkin.html | 6 +- docs/reference/FOCUS_2006_datasets.html | 2 +- docs/reference/FOMC.solution.html | 2 +- docs/reference/HS.solution.html | 2 +- docs/reference/IORE.solution.html | 4 +- docs/reference/NAFTA_SOP_2015.html | 2 +- docs/reference/Rplot001.png | Bin 27711 -> 14083 bytes docs/reference/Rplot002.png | Bin 59119 -> 13699 bytes docs/reference/Rplot003.png | Bin 59152 -> 48687 bytes docs/reference/Rplot004.png | Bin 60094 -> 58906 bytes docs/reference/Rplot005.png | Bin 19451 -> 19452 bytes docs/reference/Rplot006.png | Bin 24295 -> 24269 bytes docs/reference/SFO.solution.html | 2 +- docs/reference/SFORB.solution.html | 2 +- docs/reference/add_err.html | 2 +- docs/reference/aw.html | 2 +- docs/reference/confint.mkinfit.html | 48 +-- docs/reference/create_deg_func.html | 20 +- docs/reference/dimethenamid_2018-1.png | Bin 248143 -> 248255 bytes docs/reference/dimethenamid_2018-2.png | Bin 246117 -> 246153 bytes docs/reference/dimethenamid_2018-3.png | Bin 245058 -> 248013 bytes docs/reference/dimethenamid_2018.html | 92 ++--- docs/reference/endpoints.html | 2 +- docs/reference/experimental_data_for_UBA-1.png | Bin 102904 -> 102928 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/intervals.saem.mmkin.html | 2 +- docs/reference/loftest-3.png | Bin 76871 -> 76869 bytes docs/reference/loftest-5.png | Bin 73212 -> 73212 bytes docs/reference/loftest.html | 2 +- docs/reference/logLik.mkinfit.html | 2 +- docs/reference/logistic.solution.html | 14 +- docs/reference/lrtest.mkinfit.html | 2 +- docs/reference/max_twa_parent.html | 2 +- docs/reference/mccall81_245T.html | 52 +-- docs/reference/mean_degparms.html | 2 +- docs/reference/mixed-1.png | Bin 220021 -> 217349 bytes docs/reference/mixed.html | 6 +- docs/reference/mkin_long_to_wide.html | 2 +- docs/reference/mkin_wide_to_long.html | 2 +- docs/reference/mkinds.html | 10 +- docs/reference/mkindsg.html | 10 +- docs/reference/mkinerrmin.html | 3 +- docs/reference/mkinerrplot-1.png | Bin 41273 -> 41276 bytes docs/reference/mkinerrplot.html | 3 +- docs/reference/mkinfit.html | 75 ++-- docs/reference/mkinmod.html | 8 +- docs/reference/mkinparplot-1.png | Bin 25998 -> 26003 bytes docs/reference/mkinparplot.html | 3 +- docs/reference/mkinplot.html | 2 +- docs/reference/mkinpredict.html | 11 +- docs/reference/mkinresplot.html | 3 +- docs/reference/mmkin-1.png | Bin 111900 -> 111900 bytes docs/reference/mmkin-2.png | Bin 108747 -> 108732 bytes docs/reference/mmkin-3.png | Bin 96798 -> 96805 bytes docs/reference/mmkin-4.png | Bin 67454 -> 67450 bytes docs/reference/mmkin-5.png | Bin 65333 -> 65338 bytes docs/reference/mmkin.html | 14 +- docs/reference/nafta.html | 2 +- docs/reference/nlme-1.png | Bin 68891 -> 68895 bytes docs/reference/nlme-2.png | Bin 94389 -> 92521 bytes docs/reference/nlme.html | 2 +- docs/reference/nlme.mmkin-1.png | Bin 124929 -> 124036 bytes docs/reference/nlme.mmkin-2.png | Bin 169786 -> 168550 bytes docs/reference/nlme.mmkin-3.png | Bin 173135 -> 172044 bytes docs/reference/nlme.mmkin.html | 20 +- docs/reference/nobs.mkinfit.html | 2 +- docs/reference/parms.html | 10 +- docs/reference/plot.mixed.mmkin-2.png | Bin 173322 -> 173316 bytes docs/reference/plot.mixed.mmkin-3.png | Bin 172513 -> 172514 bytes docs/reference/plot.mixed.mmkin-4.png | Bin 175535 -> 175535 bytes docs/reference/plot.mixed.mmkin.html | 2 +- docs/reference/plot.mkinfit-2.png | Bin 73194 -> 73190 bytes docs/reference/plot.mkinfit-5.png | Bin 67141 -> 67142 bytes docs/reference/plot.mkinfit-7.png | Bin 74323 -> 74322 bytes docs/reference/plot.mkinfit.html | 7 +- docs/reference/plot.mmkin-2.png | Bin 50033 -> 50031 bytes docs/reference/plot.mmkin-3.png | Bin 46365 -> 46363 bytes docs/reference/plot.mmkin-4.png | Bin 33401 -> 33400 bytes docs/reference/plot.mmkin-5.png | Bin 58203 -> 58200 bytes docs/reference/plot.mmkin.html | 4 +- docs/reference/plot.nafta.html | 2 +- docs/reference/reexports.html | 2 +- docs/reference/residuals.mkinfit.html | 2 +- docs/reference/saem-4.png | Bin 174097 -> 171244 bytes docs/reference/saem.html | 24 +- docs/reference/sigma_twocomp.html | 4 +- docs/reference/summary.mkinfit.html | 16 +- docs/reference/summary.nlme.mmkin.html | 127 +++---- docs/reference/summary.saem.mmkin.html | 420 ++++++++++----------- docs/reference/synthetic_data_for_UBA_2014-1.png | Bin 67454 -> 67450 bytes docs/reference/synthetic_data_for_UBA_2014.html | 40 +- docs/reference/transform_odeparms.html | 2 +- docs/reference/update.mkinfit.html | 4 +- 133 files changed, 964 insertions(+), 953 deletions(-) create mode 100644 docs/articles/web_only/mkin_benchmarks.rda (limited to 'docs') diff --git a/docs/404.html b/docs/404.html index ea7f1350..e4837693 100644 --- a/docs/404.html +++ b/docs/404.html @@ -124,7 +124,7 @@ Content not found. Please use links in the navbar.

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 1363ef11..39cf7e1a 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -105,7 +105,7 @@

Example evaluation of FOCUS Example Dataset D

Johannes Ranke

-

Last change 31 January 2019 (rebuilt 2022-03-07)

+

Last change 31 January 2019 (rebuilt 2022-05-18)

Source: vignettes/FOCUS_D.rmd @@ -191,9 +191,9 @@
 summary(fit)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:15:58 2022 
-## Date of summary: Mon Mar  7 13:15:59 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:29 2022 
+## Date of summary: Wed May 18 20:42:30 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -201,7 +201,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 401 model solutions performed in 0.165 s
+## Fitted using 401 model solutions performed in 0.144 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -244,11 +244,11 @@
 ## 
 ## Parameter correlation:
 ##                   parent_0 log_k_parent   log_k_m1 f_parent_qlogis      sigma
-## parent_0         1.000e+00    5.174e-01 -1.688e-01      -5.471e-01 -1.172e-06
-## log_k_parent     5.174e-01    1.000e+00 -3.263e-01      -5.426e-01 -8.483e-07
-## log_k_m1        -1.688e-01   -3.263e-01  1.000e+00       7.478e-01  8.205e-07
-## f_parent_qlogis -5.471e-01   -5.426e-01  7.478e-01       1.000e+00  1.305e-06
-## sigma           -1.172e-06   -8.483e-07  8.205e-07       1.305e-06  1.000e+00
+## parent_0         1.000e+00    5.174e-01 -1.688e-01      -5.471e-01 -1.174e-06
+## log_k_parent     5.174e-01    1.000e+00 -3.263e-01      -5.426e-01 -8.492e-07
+## log_k_m1        -1.688e-01   -3.263e-01  1.000e+00       7.478e-01  8.220e-07
+## f_parent_qlogis -5.471e-01   -5.426e-01  7.478e-01       1.000e+00  1.307e-06
+## sigma           -1.174e-06   -8.492e-07  8.220e-07       1.307e-06  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -334,7 +334,7 @@
 
 

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index d7412a56..5f41b6a3 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -105,7 +105,7 @@

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

Last change 17 November 2016 (rebuilt 2022-03-07)

+

Last change 17 November 2016 (rebuilt 2022-05-18)

Source: vignettes/FOCUS_L.rmd @@ -132,16 +132,16 @@ m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet = TRUE) summary(m.L1.SFO)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:01 2022 
-## Date of summary: Mon Mar  7 13:16:01 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:32 2022 
+## Date of summary: Wed May 18 20:42:32 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 133 model solutions performed in 0.032 s
+## Fitted using 133 model solutions performed in 0.031 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -173,9 +173,9 @@
 ## 
 ## Parameter correlation:
 ##                parent_0 log_k_parent      sigma
-## parent_0      1.000e+00    6.186e-01 -1.516e-09
-## log_k_parent  6.186e-01    1.000e+00 -3.124e-09
-## sigma        -1.516e-09   -3.124e-09  1.000e+00
+## parent_0      1.000e+00    6.186e-01 -1.712e-09
+## log_k_parent  6.186e-01    1.000e+00 -3.237e-09
+## sigma        -1.712e-09   -3.237e-09  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -225,29 +225,26 @@
 

For comparison, the FOMC model is fitted as well, and the \(\chi^2\) error level is checked.

-m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
-
## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation did not converge:
-## false convergence (8)
-
-plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")
+m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE) +plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")

-
+
 summary(m.L1.FOMC, data = FALSE)
## Warning in sqrt(diag(covar)): NaNs produced
## Warning in sqrt(1/diag(V)): NaNs produced
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
 ## doubtful
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:02 2022 
-## Date of summary: Mon Mar  7 13:16:02 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:33 2022 
+## Date of summary: Wed May 18 20:42:33 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 369 model solutions performed in 0.081 s
+## Fitted using 357 model solutions performed in 0.072 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -268,39 +265,34 @@
 ## Fixed parameter values:
 ## None
 ## 
-## 
-## Warning(s): 
-## Optimisation did not converge:
-## false convergence (8)
-## 
 ## Results:
 ## 
-##        AIC      BIC   logLik
-##   95.88781 99.44929 -43.9439
+##        AIC      BIC    logLik
+##   95.88804 99.44953 -43.94402
 ## 
 ## Optimised, transformed parameters with symmetric confidence intervals:
 ##           Estimate Std. Error  Lower  Upper
 ## parent_0     92.47     1.2820 89.720 95.220
-## log_alpha    13.78        NaN    NaN    NaN
-## log_beta     16.13        NaN    NaN    NaN
-## sigma         2.78     0.4598  1.794  3.766
+## log_alpha    11.37        NaN    NaN    NaN
+## log_beta     13.72        NaN    NaN    NaN
+## sigma         2.78     0.4621  1.789  3.771
 ## 
 ## Parameter correlation:
 ##            parent_0 log_alpha log_beta     sigma
-## parent_0  1.0000000       NaN      NaN 0.0001671
+## parent_0  1.0000000       NaN      NaN 0.0005548
 ## log_alpha       NaN         1      NaN       NaN
 ## log_beta        NaN       NaN        1       NaN
-## sigma     0.0001671       NaN      NaN 1.0000000
+## sigma     0.0005548       NaN      NaN 1.0000000
 ## 
 ## 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 9.247e+01      NA     NA 89.720 95.220
-## alpha    9.658e+05      NA     NA     NA     NA
-## beta     1.010e+07      NA     NA     NA     NA
-## sigma    2.780e+00      NA     NA  1.794  3.766
+## parent_0     92.47      NA     NA 89.720 95.220
+## alpha     87110.00      NA     NA     NA     NA
+## beta     911100.00      NA     NA     NA     NA
+## sigma         2.78      NA     NA  1.789  3.771
 ## 
 ## FOCUS Chi2 error levels in percent:
 ##          err.min n.optim df
@@ -308,8 +300,8 @@
 ## parent     3.619       3  6
 ## 
 ## Estimated disappearance times:
-##        DT50  DT90 DT50back
-## parent 7.25 24.08     7.25
+## DT50 DT90 DT50back +## parent 7.249 24.08 7.249

We get a warning that the default optimisation algorithm Port did not converge, which is an indication that the model is overparameterised, i.e. contains too many parameters that are ill-defined as a consequence.

And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the \(\chi^2\) error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters log_alpha and log_beta internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of alpha and beta. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of log_alpha and log_beta is 1.000, clearly indicating that the model is overparameterised.

The \(\chi^2\) error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same \(\chi^2\) error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of \(\chi^2\) error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt (Ranke 2014).

@@ -318,7 +310,7 @@

Laboratory Data L2

The following code defines example dataset L2 from the FOCUS kinetics report, p. 287:

-
+
 FOCUS_2006_L2 = data.frame(
   t = rep(c(0, 1, 3, 7, 14, 28), each = 2),
   parent = c(96.1, 91.8, 41.4, 38.7,
@@ -329,7 +321,7 @@
 

SFO fit for L2

Again, the SFO model is fitted and the result is plotted. The residual plot can be obtained simply by adding the argument show_residuals to the plot command.

-
+
 m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE)
 plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - SFO")
@@ -342,24 +334,24 @@

FOMC fit for L2

For comparison, the FOMC model is fitted as well, and the \(\chi^2\) error level is checked.

-
+
 m.L2.FOMC <- mkinfit("FOMC", FOCUS_2006_L2_mkin, quiet = TRUE)
 plot(m.L2.FOMC, show_residuals = TRUE,
      main = "FOCUS L2 - FOMC")

-
+
 summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:03 2022 
-## Date of summary: Mon Mar  7 13:16:03 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:33 2022 
+## Date of summary: Wed May 18 20:42:33 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 239 model solutions performed in 0.049 s
+## Fitted using 239 model solutions performed in 0.044 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -394,10 +386,10 @@
 ## 
 ## Parameter correlation:
 ##             parent_0  log_alpha   log_beta      sigma
-## parent_0   1.000e+00 -1.151e-01 -2.085e-01 -7.828e-09
-## log_alpha -1.151e-01  1.000e+00  9.741e-01 -1.602e-07
-## log_beta  -2.085e-01  9.741e-01  1.000e+00 -1.372e-07
-## sigma     -7.828e-09 -1.602e-07 -1.372e-07  1.000e+00
+## parent_0   1.000e+00 -1.151e-01 -2.085e-01 -7.637e-09
+## log_alpha -1.151e-01  1.000e+00  9.741e-01 -1.617e-07
+## log_beta  -2.085e-01  9.741e-01  1.000e+00 -1.387e-07
+## sigma     -7.637e-09 -1.617e-07 -1.387e-07  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -423,17 +415,17 @@
 

DFOP fit for L2

Fitting the four parameter DFOP model further reduces the \(\chi^2\) error level.

-
+
 m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, quiet = TRUE)
 plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - DFOP")

-
+
 summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:03 2022 
-## Date of summary: Mon Mar  7 13:16:03 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:34 2022 
+## Date of summary: Wed May 18 20:42:34 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -442,7 +434,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 581 model solutions performed in 0.132 s
+## Fitted using 581 model solutions performed in 0.121 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -473,18 +465,18 @@
 ## Optimised, transformed parameters with symmetric confidence intervals:
 ##          Estimate Std. Error      Lower     Upper
 ## parent_0   93.950  9.998e-01    91.5900   96.3100
-## log_k1      3.112  1.842e+03 -4353.0000 4359.0000
+## log_k1      3.113  1.845e+03 -4360.0000 4367.0000
 ## log_k2     -1.088  6.285e-02    -1.2370   -0.9394
 ## g_qlogis   -0.399  9.946e-02    -0.6342   -0.1638
 ## sigma       1.414  2.886e-01     0.7314    2.0960
 ## 
 ## Parameter correlation:
 ##            parent_0     log_k1     log_k2   g_qlogis      sigma
-## parent_0  1.000e+00  6.783e-07 -3.390e-10  2.665e-01 -2.967e-10
-## log_k1    6.783e-07  1.000e+00  1.116e-04 -2.196e-04 -1.031e-05
-## log_k2   -3.390e-10  1.116e-04  1.000e+00 -7.903e-01  2.917e-09
-## g_qlogis  2.665e-01 -2.196e-04 -7.903e-01  1.000e+00 -4.408e-09
-## sigma    -2.967e-10 -1.031e-05  2.917e-09 -4.408e-09  1.000e+00
+## parent_0  1.000e+00  6.784e-07 -5.188e-10  2.665e-01 -5.800e-10
+## log_k1    6.784e-07  1.000e+00  1.114e-04 -2.191e-04 -1.029e-05
+## log_k2   -5.188e-10  1.114e-04  1.000e+00 -7.903e-01  5.080e-09
+## g_qlogis  2.665e-01 -2.191e-04 -7.903e-01  1.000e+00 -7.991e-09
+## sigma    -5.800e-10 -1.029e-05  5.080e-09 -7.991e-09  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -492,7 +484,7 @@
 ## for estimators of untransformed parameters.
 ##          Estimate   t value    Pr(>t)   Lower   Upper
 ## parent_0  93.9500 9.397e+01 2.036e-12 91.5900 96.3100
-## k1        22.4800 5.553e-04 4.998e-01  0.0000     Inf
+## k1        22.4800 5.544e-04 4.998e-01  0.0000     Inf
 ## k2         0.3369 1.591e+01 4.697e-07  0.2904  0.3909
 ## g          0.4016 1.680e+01 3.238e-07  0.3466  0.4591
 ## sigma      1.4140 4.899e+00 8.776e-04  0.7314  2.0960
@@ -504,15 +496,15 @@
 ## 
 ## Estimated disappearance times:
 ##          DT50  DT90 DT50back DT50_k1 DT50_k2
-## parent 0.5335 5.311    1.599 0.03084   2.058
-

Here, the DFOP model is clearly the best-fit model for dataset L2 based on the chi^2 error level criterion. However, the failure to calculate the covariance matrix indicates that the parameter estimates correlate excessively. Therefore, the FOMC model may be preferred for this dataset.

+## parent 0.5335 5.311 1.599 0.03083 2.058
+

Here, the DFOP model is clearly the best-fit model for dataset L2 based on the chi^2 error level criterion.

Laboratory Data L3

The following code defines example dataset L3 from the FOCUS kinetics report, p. 290.

-
+
 FOCUS_2006_L3 = data.frame(
   t = c(0, 3, 7, 14, 30, 60, 91, 120),
   parent = c(97.8, 60, 51, 43, 35, 22, 15, 12))
@@ -521,7 +513,7 @@
 

Fit multiple models

As of mkin version 0.9-39 (June 2015), we can fit several models to one or more datasets in one call to the function mmkin. The datasets have to be passed in a list, in this case a named list holding only the L3 dataset prepared above.

-
+
 # Only use one core here, not to offend the CRAN checks
 mm.L3 <- mmkin(c("SFO", "FOMC", "DFOP"), cores = 1,
                list("FOCUS L3" = FOCUS_2006_L3_mkin), quiet = TRUE)
@@ -534,12 +526,12 @@
 
 

The objects returned by mmkin are arranged like a matrix, with models as a row index and datasets as a column index.

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.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:04 2022 
-## Date of summary: Mon Mar  7 13:16:04 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:34 2022 
+## Date of summary: Wed May 18 20:42:35 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -548,7 +540,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 376 model solutions performed in 0.08 s
+## Fitted using 376 model solutions performed in 0.073 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -586,11 +578,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.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.926e-07
-## sigma    -9.664e-08  7.147e-07  1.022e-06 -7.926e-07  1.000e+00
+## parent_0  1.000e+00  1.732e-01  2.282e-02  4.009e-01 -9.632e-08
+## log_k1    1.732e-01  1.000e+00  4.945e-01 -5.809e-01  7.145e-07
+## log_k2    2.282e-02  4.945e-01  1.000e+00 -6.812e-01  1.021e-06
+## g_qlogis  4.009e-01 -5.809e-01 -6.812e-01  1.000e+00 -7.925e-07
+## sigma    -9.632e-08  7.145e-07  1.021e-06 -7.925e-07  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -622,7 +614,7 @@
 ##    60   parent     22.0     23.26 -1.25919
 ##    91   parent     15.0     15.18 -0.18181
 ##   120   parent     12.0     10.19  1.81395
-
+
 plot(mm.L3[["DFOP", 1]], show_errmin = TRUE)

Here, a look to the model plot, the confidence intervals of the parameters and the correlation matrix suggest that the parameter estimates are reliable, and the DFOP model can be used as the best-fit model based on the \(\chi^2\) error level criterion for laboratory data L3.

@@ -633,13 +625,13 @@

Laboratory Data L4

The following code defines example dataset L4 from the FOCUS kinetics report, p. 293:

-
+
 FOCUS_2006_L4 = data.frame(
   t = c(0, 3, 7, 14, 30, 60, 91, 120),
   parent = c(96.6, 96.3, 94.3, 88.8, 74.9, 59.9, 53.5, 49.0))
 FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4)

Fits of the SFO and FOMC models, plots and summaries are produced below:

-
+
 # Only use one core here, not to offend the CRAN checks
 mm.L4 <- mmkin(c("SFO", "FOMC"), cores = 1,
                list("FOCUS L4" = FOCUS_2006_L4_mkin),
@@ -647,19 +639,19 @@
 plot(mm.L4)

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.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:04 2022 
-## Date of summary: Mon Mar  7 13:16:05 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:35 2022 
+## Date of summary: Wed May 18 20:42:35 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 142 model solutions performed in 0.029 s
+## Fitted using 142 model solutions performed in 0.027 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -691,9 +683,9 @@
 ## 
 ## Parameter correlation:
 ##               parent_0 log_k_parent     sigma
-## parent_0     1.000e+00    5.938e-01 3.387e-07
-## log_k_parent 5.938e-01    1.000e+00 5.830e-07
-## sigma        3.387e-07    5.830e-07 1.000e+00
+## parent_0     1.000e+00    5.938e-01 3.440e-07
+## log_k_parent 5.938e-01    1.000e+00 5.885e-07
+## sigma        3.440e-07    5.885e-07 1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -712,19 +704,19 @@
 ## Estimated disappearance times:
 ##        DT50 DT90
 ## parent  106  352
-
+
 summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    1.1.0 
-## R version used for fitting:       4.1.2 
-## Date of fit:     Mon Mar  7 13:16:04 2022 
-## Date of summary: Mon Mar  7 13:16:05 2022 
+## R version used for fitting:       4.2.0 
+## Date of fit:     Wed May 18 20:42:35 2022 
+## Date of summary: Wed May 18 20:42:35 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 224 model solutions performed in 0.045 s
+## Fitted using 224 model solutions performed in 0.041 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -759,10 +751,10 @@
 ## 
 ## Parameter correlation:
 ##             parent_0  log_alpha   log_beta      sigma
-## 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
+## parent_0   1.000e+00 -4.696e-01 -5.543e-01 -2.563e-07
+## log_alpha -4.696e-01  1.000e+00  9.889e-01  4.066e-08
+## log_beta  -5.543e-01  9.889e-01  1.000e+00  6.818e-08
+## sigma     -2.563e-07  4.066e-08  6.818e-08  1.000e+00
 ## 
 ## Backtransformed parameters:
 ## Confidence intervals for internally transformed parameters are asymmetric.
@@ -811,7 +803,7 @@
 
 

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

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 b6130527..b56e91e1 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/index.html b/docs/articles/index.html index f340896b..89eb092b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -112,7 +112,7 @@
-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index 60d2ef1c..a32f4b41 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -105,7 +105,7 @@

Introduction to mkin

Johannes Ranke

-

Last change 15 February 2021 (rebuilt 2022-03-07)

+

Last change 15 February 2021 (rebuilt 2022-05-18)

Source: vignettes/mkin.rmd @@ -264,7 +264,7 @@

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png index 63246387..d1e7048d 100644 Binary files a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png and b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/twa.html b/docs/articles/twa.html index d45b0ff4..dad8ee44 100644 --- a/docs/articles/twa.html +++ b/docs/articles/twa.html @@ -105,7 +105,7 @@

Calculation of time weighted average concentrations with mkin

Johannes Ranke

-

Last change 18 September 2019 (rebuilt 2022-03-07)

+

Last change 18 September 2019 (rebuilt 2022-05-18)

Source: vignettes/twa.rmd @@ -168,7 +168,7 @@

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html index 43508280..0dafb98a 100644 --- a/docs/articles/web_only/FOCUS_Z.html +++ b/docs/articles/web_only/FOCUS_Z.html @@ -105,7 +105,7 @@

Example evaluation of FOCUS dataset Z

Johannes Ranke

-

Last change 16 January 2018 (rebuilt 2022-03-07)

+

Last change 16 January 2018 (rebuilt 2022-05-18)

Source: vignettes/web_only/FOCUS_Z.rmd @@ -234,33 +234,31 @@ quiet = TRUE)
## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, :
 ## Observations with value of zero were removed from the data
-
## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation did not converge:
-## false convergence (8)
-
+
 plot_sep(m.Z.FOCUS)

-
+
 summary(m.Z.FOCUS, data = FALSE)$bpar
##             Estimate se_notrans t value     Pr(>t)     Lower      Upper
-## Z0_0       96.838822   1.994274 48.5584 4.0280e-42 92.826981 100.850664
-## k_Z0        2.215393   0.118458 18.7019 1.0413e-23  1.989456   2.466989
-## k_Z1        0.478305   0.028258 16.9266 6.2418e-22  0.424708   0.538666
-## k_Z2        0.451627   0.042139 10.7176 1.6314e-14  0.374339   0.544872
-## k_Z3        0.058692   0.015245  3.8499 1.7803e-04  0.034808   0.098965
-## f_Z2_to_Z3  0.471502   0.058351  8.0805 9.6608e-11  0.357769   0.588274
+## Z0_0       96.838397   1.994270 48.5583 4.0284e-42 92.826435 100.850359
+## k_Z0        2.215406   0.118459 18.7018 1.0416e-23  1.989466   2.467005
+## k_Z1        0.478300   0.028257 16.9267 6.2409e-22  0.424702   0.538662
+## k_Z2        0.451616   0.042137 10.7178 1.6305e-14  0.374328   0.544863
+## k_Z3        0.058693   0.015245  3.8499 1.7803e-04  0.034805   0.098976
+## f_Z2_to_Z3  0.471509   0.058352  8.0804 9.6622e-11  0.357739   0.588317
 ## sigma       3.984431   0.383402 10.3923 4.5575e-14  3.213126   4.755736
-
+
 endpoints(m.Z.FOCUS)
## $ff
 ##   Z2_Z3 Z2_sink 
-##  0.4715  0.5285 
+## 0.47151 0.52849 
 ## 
 ## $distimes
 ##        DT50    DT90
 ## Z0  0.31288  1.0394
-## Z1  1.44917  4.8141
-## Z2  1.53478  5.0984
-## Z3 11.80986 39.2315
+## Z1 1.44919 4.8141 +## Z2 1.53481 5.0985 +## Z3 11.80971 39.2310

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.

@@ -268,32 +266,34 @@

As the FOCUS report states, there is a certain tailing of the time course of metabolite Z3. Also, the time course of the parent compound is not fitted very well using the SFO model, as residues at a certain low level remain.

Therefore, an additional model is offered here, using the single first-order reversible binding (SFORB) model for metabolite Z3. As expected, the \(\chi^2\) error level is lower for metabolite Z3 using this model and the graphical fit for Z3 is improved. However, the covariance matrix is not returned.

-
+
 Z.mkin.1 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO", "Z3"),
                     Z3 = mkinsub("SFORB"))
## Temporary DLL for differentials generated and loaded
-
+
 m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE)
## Warning in mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
 ## value of zero were removed from the data
-
+
 plot_sep(m.Z.mkin.1)

-
+
 summary(m.Z.mkin.1, data = FALSE)$cov.unscaled
## NULL

Therefore, a further stepwise model building is performed starting from the stage of parent and two metabolites, starting from the assumption that the model fit for the parent compound can be improved by using the SFORB model.

-
+
 Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
                     Z2 = mkinsub("SFO"))
## Temporary DLL for differentials generated and loaded
-
+
 m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE)
## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
 ## value of zero were removed from the data
+
## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Optimisation did not converge:
+## false convergence (8)
 plot_sep(m.Z.mkin.3)

@@ -359,11 +359,11 @@ ## ## $SFORB ## Z0_b1 Z0_b2 Z3_b1 Z3_b2 -## 2.4471322 0.0075125 0.0800069 0.0000000 +## 2.4471376 0.0075126 0.0800073 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.266 NA NA +## Z0 0.3043 1.1848 0.35666 0.28325 92.264 NA NA ## Z1 1.5148 5.0320 NA NA NA NA NA ## Z2 1.6414 5.4526 NA NA NA NA NA ## Z3 NA NA NA NA NA 8.6636 Inf
@@ -398,7 +398,7 @@

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

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 bc6efaf7..229bae82 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 55c1b645..e13ad9aa 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 8e63cd04..ae160414 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 3902e059..23e270d1 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_5-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png index d95cac25..77965455 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 cb333a1c..250d0df5 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_9-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png index db807f14..5a01c03e 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/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html index 996e5d49..df1e06db 100644 --- a/docs/articles/web_only/NAFTA_examples.html +++ b/docs/articles/web_only/NAFTA_examples.html @@ -43,7 +43,7 @@ Functions and data
@@ -212,7 +212,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.84e+01 1.24e-27 97.8078 98.9187 ## k1 1.55e-02 4.10e-04 0.0143 0.0167 -## k2 8.63e-12 5.00e-01 0.0000 Inf +## k2 9.41e-12 5.00e-01 0.0000 Inf ## g 6.89e-01 2.92e-03 0.6626 0.7142 ## sigma 6.48e-01 2.38e-05 0.4147 0.8813 ## @@ -221,7 +221,7 @@ ## DT50 DT90 DT50_rep ## SFO 86.6 2.88e+02 8.66e+01 ## IORE 85.5 7.17e+02 2.16e+02 -## DFOP 83.6 1.32e+11 8.04e+10 +## DFOP 83.6 1.21e+11 7.36e+10 ## ## Representative half-life: ## [1] 215.87
@@ -263,7 +263,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.66e+01 1.57e-25 95.3476 97.8979 ## k1 2.55e-02 7.33e-06 0.0233 0.0278 -## k2 3.22e-11 5.00e-01 0.0000 Inf +## k2 4.40e-11 5.00e-01 0.0000 Inf ## g 8.61e-01 7.55e-06 0.8314 0.8867 ## sigma 1.46e+00 6.93e-06 0.9661 1.9483 ## @@ -272,7 +272,7 @@ ## DT50 DT90 DT50_rep ## SFO 38.6 1.28e+02 3.86e+01 ## IORE 34.0 1.77e+02 5.32e+01 -## DFOP 34.1 1.01e+10 2.15e+10 +## DFOP 34.1 7.43e+09 1.58e+10 ## ## Representative half-life: ## [1] 53.17
@@ -314,7 +314,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.89e+01 9.44e-49 95.4640 102.2573 ## k1 1.81e-02 1.75e-01 0.0116 0.0281 -## k2 3.63e-10 5.00e-01 0.0000 Inf +## k2 2.81e-10 5.00e-01 0.0000 Inf ## g 6.06e-01 2.19e-01 0.4826 0.7178 ## sigma 7.40e+00 2.97e-15 6.0201 8.7754 ## @@ -323,7 +323,7 @@ ## DT50 DT90 DT50_rep ## SFO 94.3 3.13e+02 9.43e+01 ## IORE 96.7 1.51e+03 4.55e+02 -## DFOP 96.4 3.77e+09 1.91e+09 +## DFOP 96.4 4.87e+09 2.46e+09 ## ## Representative half-life: ## [1] 454.55
@@ -434,7 +434,7 @@ ## DT50 DT90 DT50_rep ## SFO 16.9 5.63e+01 1.69e+01 ## IORE 11.6 3.37e+02 1.01e+02 -## DFOP 10.5 1.38e+12 7.69e+11 +## DFOP 10.5 1.38e+12 7.68e+11 ## ## Representative half-life: ## [1] 101.43
@@ -445,17 +445,12 @@
 p9b <- nafta(NAFTA_SOP_Attachment[["p9b"]])
-
## Warning in sqrt(diag(covar)): NaNs produced
-
## Warning in sqrt(diag(covar_notrans)): NaNs produced
-
## Warning in sqrt(1/diag(V)): NaNs produced
-
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
-## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p9b)

-
+
 print(p9b)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -482,8 +477,8 @@
 ##          Estimate   Pr(>t)   Lower   Upper
 ## parent_0  94.7123 1.61e-16 93.1355 96.2891
 ## k1         0.0389 1.08e-04  0.0266  0.0569
-## k2         0.0389 2.23e-04  0.0255  0.0592
-## g          0.5256      NaN      NA      NA
+## k2         0.0389 2.24e-04  0.0255  0.0592
+## g          0.5256 5.00e-01  0.0000  1.0000
 ## sigma      1.5957 2.50e-04  0.9135  2.2779
 ## 
 ## 
@@ -500,7 +495,7 @@
 

Example on page 10

-
+
 p10 <- nafta(NAFTA_SOP_Attachment[["p10"]])
## Warning in sqrt(diag(covar)): NaNs produced
## Warning in sqrt(1/diag(V)): NaNs produced
@@ -508,10 +503,10 @@ ## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p10)

-
+
 print(p10)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -537,8 +532,8 @@
 ## $DFOP
 ##          Estimate   Pr(>t)   Lower    Upper
 ## parent_0 101.7315 1.41e-09 91.6534 111.8097
-## k1         0.0495 6.58e-03  0.0303   0.0809
-## k2         0.0495 2.60e-03  0.0410   0.0598
+## k1         0.0495 6.32e-03  0.0241   0.1018
+## k2         0.0495 2.41e-03  0.0272   0.0901
 ## g          0.4487 5.00e-01      NA       NA
 ## sigma      8.0152 2.50e-04  4.5886  11.4418
 ## 
@@ -560,14 +555,14 @@
 

Example on page 11

-
+
 p11 <- nafta(NAFTA_SOP_Attachment[["p11"]])
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p11)

-
+
 print(p11)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -594,7 +589,7 @@
 ##          Estimate   Pr(>t)    Lower    Upper
 ## parent_0 1.05e+02 9.47e-13  99.9990 109.1224
 ## k1       4.41e-02 5.95e-03   0.0296   0.0658
-## k2       9.94e-13 5.00e-01   0.0000      Inf
+## k2       9.93e-13 5.00e-01   0.0000      Inf
 ## g        3.22e-01 1.45e-03   0.2814   0.3650
 ## sigma    3.22e+00 3.52e-04   1.8410   4.5906
 ## 
@@ -606,7 +601,7 @@
 ## DFOP 3.07e+11 1.93e+12 6.98e+11
 ## 
 ## Representative half-life:
-## [1] 41148170
+## [1] 41148171

In this case, the DFOP fit reported for PestDF resulted in a negative value for the slower rate constant, which is not possible in mkin. The other results are in agreement.

@@ -617,21 +612,19 @@

Example on page 12, upper panel

-
+
 p12a <- nafta(NAFTA_SOP_Attachment[["p12a"]])
## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
+## matrix
+
+## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
 ## matrix
-
## Warning in sqrt(diag(covar)): NaNs produced
-
## Warning in sqrt(diag(covar_notrans)): NaNs produced
-
## Warning in sqrt(1/diag(V)): NaNs produced
-
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
-## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p12a)

-
+
 print(p12a)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -655,12 +648,12 @@
 ## sigma             3.965     NA    NA    NA
 ## 
 ## $DFOP
-##          Estimate   Pr(>t)   Lower   Upper
-## parent_0  100.521 2.74e-10 92.2366 108.805
-## k1          0.124 2.53e-05  0.0908   0.170
-## k2          0.124 2.52e-02  0.0456   0.339
-## g           0.793      NaN      NA      NA
-## sigma       7.048 2.50e-04  4.0349  10.061
+##          Estimate Pr(>t) Lower Upper
+## parent_0  100.521     NA    NA    NA
+## k1          0.124     NA    NA    NA
+## k2          0.124     NA    NA    NA
+## g           0.793     NA    NA    NA
+## sigma       7.048     NA    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -675,18 +668,17 @@
 

Example on page 12, lower panel

-
+
 p12b <- nafta(NAFTA_SOP_Attachment[["p12b"]])
## Warning in qt(alpha/2, rdf): NaNs produced
## Warning in qt(1 - alpha/2, rdf): NaNs produced
-
## Warning in sqrt(diag(covar_notrans)): NaNs produced
## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs produced
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p12b)

-
+
 print(p12b)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -730,14 +722,18 @@
 

Example on page 13

-
+
 p13 <- nafta(NAFTA_SOP_Attachment[["p13"]])
+
## Warning in sqrt(diag(covar)): NaNs produced
+
## Warning in sqrt(1/diag(V)): NaNs produced
+
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p13)

-
+
 print(p13)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -763,9 +759,9 @@
 ## $DFOP
 ##          Estimate Pr(>t)    Lower    Upper
 ## parent_0 92.73500     NA 8.95e+01 95.92118
-## k1        0.00258     NA 4.14e-04  0.01611
-## k2        0.00258     NA 1.74e-03  0.00383
-## g         0.16452     NA 0.00e+00  1.00000
+## k1        0.00258     NA 4.24e-04  0.01573
+## k2        0.00258     NA 1.76e-03  0.00379
+## g         0.16452     NA       NA       NA
 ## sigma     3.41172     NA 2.02e+00  4.79960
 ## 
 ## 
@@ -782,7 +778,7 @@
 

DT50 not observed in the study and DFOP problems in PestDF

-
+
 p14 <- nafta(NAFTA_SOP_Attachment[["p14"]])
## Warning in sqrt(diag(covar)): NaNs produced
## Warning in sqrt(1/diag(V)): NaNs produced
@@ -790,10 +786,10 @@ ## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p14)

-
+
 print(p14)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -820,7 +816,7 @@
 ##          Estimate   Pr(>t)    Lower    Upper
 ## parent_0 1.00e+02 2.96e-28 99.40280 101.2768
 ## k1       9.53e-03 1.20e-01  0.00638   0.0143
-## k2       6.08e-12 5.00e-01  0.00000      Inf
+## k2       5.03e-12 5.00e-01  0.00000      Inf
 ## g        3.98e-01 2.19e-01  0.30481   0.4998
 ## sigma    1.17e+00 7.68e-06  0.77406   1.5610
 ## 
@@ -829,7 +825,7 @@
 ##          DT50     DT90 DT50_rep
 ## SFO  2.48e+02 8.25e+02 2.48e+02
 ## IORE 4.34e+02 2.22e+04 6.70e+03
-## DFOP 3.05e+10 2.95e+11 1.14e+11
+## DFOP 3.69e+10 3.57e+11 1.38e+11
 ## 
 ## Representative half-life:
 ## [1] 6697.44
@@ -838,14 +834,18 @@

N is less than 1 and DFOP fraction parameter is below zero

-
+
 p15a <- nafta(NAFTA_SOP_Attachment[["p15a"]])
+
## Warning in sqrt(diag(covar)): NaNs produced
+
## Warning in sqrt(1/diag(V)): NaNs produced
+
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p15a)

-
+
 print(p15a)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -871,9 +871,9 @@
 ## $DFOP
 ##          Estimate   Pr(>t)    Lower    Upper
 ## parent_0 97.96751 2.85e-13 94.21913 101.7159
-## k1        0.00952 6.28e-02  0.00250   0.0363
-## k2        0.00952 1.27e-04  0.00646   0.0140
-## g         0.21241 5.00e-01  0.00000   1.0000
+## k1        0.00952 6.28e-02  0.00260   0.0349
+## k2        0.00952 1.27e-04  0.00652   0.0139
+## g         0.21241 5.00e-01       NA       NA
 ## sigma     4.18778 2.50e-04  2.39747   5.9781
 ## 
 ## 
@@ -885,18 +885,14 @@
 ## 
 ## Representative half-life:
 ## [1] 41.33
-
+
 p15b <- nafta(NAFTA_SOP_Attachment[["p15b"]])
-
## Warning in sqrt(diag(covar)): NaNs produced
-
## Warning in sqrt(1/diag(V)): NaNs produced
-
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
-## doubtful
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The half-life obtained from the IORE model may be used
-
+
 plot(p15b)

-
+
 print(p15b)
## Sums of squares:
 ##       SFO      IORE      DFOP 
@@ -916,15 +912,15 @@
 ##                Estimate   Pr(>t)    Lower  Upper
 ## parent_0          99.83 1.81e-16 97.51349 102.14
 ## k__iore_parent     0.38 3.22e-01  0.00352  41.05
-## N_parent           0.00 5.00e-01 -1.07696   1.08
+## N_parent           0.00 5.00e-01 -1.07695   1.08
 ## sigma              2.21 2.57e-04  1.23245   3.19
 ## 
 ## $DFOP
 ##          Estimate Pr(>t)    Lower    Upper
 ## parent_0 1.01e+02     NA 9.82e+01 1.04e+02
-## k1       4.86e-03     NA 8.63e-04 2.73e-02
+## k1       4.86e-03     NA 8.62e-04 2.74e-02
 ## k2       4.86e-03     NA 3.21e-03 7.35e-03
-## g        1.88e-01     NA       NA       NA
+## g        1.88e-01     NA 0.00e+00 1.00e+00
 ## sigma    2.76e+00     NA 1.58e+00 3.94e+00
 ## 
 ## 
@@ -941,16 +937,16 @@
 

The DFOP fraction parameter is greater than 1

-
+
 p16 <- nafta(NAFTA_SOP_Attachment[["p16"]])
## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c
## The representative half-life of the IORE model is longer than the one corresponding
## to the terminal degradation rate found with the DFOP model.
## The representative half-life obtained from the DFOP model may be used
-
+
 plot(p16)

-
+
 print(p16)
## Sums of squares:
 ##      SFO     IORE     DFOP 
@@ -1026,7 +1022,7 @@
 
 

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png index 75611a70..a53c48b2 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png differ diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png index b6faeff9..fb211a8e 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png differ diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png index 6b9ba98c..9aedbf16 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png differ diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png index db90244b..034eed46 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png differ diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png index a33372e8..86cd9755 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png differ diff --git a/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png b/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png index d64ea98d..10225504 100644 Binary files a/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png and b/docs/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png differ diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html index 2eea3cb2..058d43fa 100644 --- a/docs/articles/web_only/benchmarks.html +++ b/docs/articles/web_only/benchmarks.html @@ -43,7 +43,7 @@ Functions and data
## Temporary DLL for differentials generated and loaded
-FOCUS_D <- subset(FOCUS_2006_D, value != 0)
+FOCUS_D <- subset(FOCUS_2006_D, value != 0)

We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the benchmark package. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed. Since mkin version 0.9.49.11, an analytical solution is also implemented, which is included in the tests below.

 if (require(rbenchmark)) {
-  b.1 <- benchmark(
+  b.1 <- benchmark(
     "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_D,
        solution_type = "deSolve",
        use_compiled = FALSE, quiet = TRUE),
@@ -162,11 +162,7 @@
 } else {
   print("R package rbenchmark is not available")
 }
-
##                    test replications relative elapsed
-## 4            analytical            1    1.000   0.216
-## 3     deSolve, compiled            1    1.708   0.369
-## 2      Eigenvalue based            1    1.866   0.403
-## 1 deSolve, not compiled            1   34.009   7.346
+
## [1] "R package rbenchmark is not available"

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

@@ -179,7 +175,7 @@ parent = mkinsub("FOMC", "m1"), m1 = mkinsub( "SFO")) - b.2 <- benchmark( + b.2 <- benchmark( "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_D, use_compiled = FALSE, quiet = TRUE), "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE), @@ -191,16 +187,14 @@ factor_FOMC_SFO <- NA print("R package benchmark is not available") }
-
## Temporary DLL for differentials generated and loaded
-
##                    test replications relative elapsed
-## 2     deSolve, compiled            1    1.000   0.533
-## 1 deSolve, not compiled            1   25.146  13.403
-

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

+
## Loading required package: rbenchmark
+
## [1] "R package benchmark is not available"
+

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

This vignette was built with mkin 1.1.0 on

-
## R version 4.1.2 (2021-11-01)
+
## R version 4.2.0 (2022-04-22)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
 ## Running under: Debian GNU/Linux 11 (bullseye)
-
## CPU model: AMD Ryzen 7 1700 Eight-Core Processor
+
## CPU model: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
@@ -221,7 +215,7 @@

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/web_only/dimethenamid_2018.html b/docs/articles/web_only/dimethenamid_2018.html index 09aa5150..7650f06f 100644 --- a/docs/articles/web_only/dimethenamid_2018.html +++ b/docs/articles/web_only/dimethenamid_2018.html @@ -105,7 +105,7 @@

Example evaluations of the dimethenamid data from 2018

Johannes Ranke

-

Last change 7 March 2022, built on 16 Mar 2022

+

Last change 7 March 2022, built on 18 May 2022

Source: vignettes/web_only/dimethenamid_2018.rmd @@ -178,7 +178,7 @@ Status of individual fits: dataset model Calke Borstel Flaach BBA 2.2 BBA 2.3 Elliot - DFOP OK OK C OK C OK + DFOP OK OK OK OK C OK OK: No warnings C: Optimisation did not converge: @@ -231,32 +231,41 @@ f_parent_nlme_dfop_tc 3 10 671.91 702.34 -325.96 2 vs 3 134.69 <.0001

The saemix package provided the first Open Source implementation of the Stochastic Approximation to the Expectation Maximisation (SAEM) algorithm. SAEM fits of degradation models can be conveniently performed using an interface to the saemix package available in current development versions of the mkin package.

The corresponding SAEM fits of the four combinations of degradation and error models are fitted below. As there is no convergence criterion implemented in the saemix package, the convergence plots need to be manually checked for every fit. We define control settings that work well for all the parent data fits shown in this vignette.

-library(saemix)
-saemix_control <- saemixControl(nbiter.saemix = c(800, 300), nb.chains = 15,
+library(saemix)
+
Loading required package: npde
+
Package saemix, version 3.0
+  please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr
+

+Attaching package: 'saemix'
+
The following objects are masked from 'package:npde':
+
+    kurtosis, skewness
+
+saemix_control <- saemixControl(nbiter.saemix = c(800, 300), nb.chains = 15,
     print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE)
 saemix_control_moreiter <- saemixControl(nbiter.saemix = c(1600, 300), nb.chains = 15,
     print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE)
 saemix_control_10k <- saemixControl(nbiter.saemix = c(10000, 300), nb.chains = 15,
     print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE)

The convergence plot for the SFO model using constant variance is shown below.

-
+
 f_parent_saemix_sfo_const <- mkin::saem(f_parent_mkin_const["SFO", ], quiet = TRUE,
   control = saemix_control, transformations = "saemix")
 plot(f_parent_saemix_sfo_const$so, plot.type = "convergence")

Obviously the selected number of iterations is sufficient to reach convergence. This can also be said for the SFO fit using the two-component error model.

-
+
 f_parent_saemix_sfo_tc <- mkin::saem(f_parent_mkin_tc["SFO", ], quiet = TRUE,
   control = saemix_control, transformations = "saemix")
 plot(f_parent_saemix_sfo_tc$so, plot.type = "convergence")

When fitting the DFOP model with constant variance (see below), parameter convergence is not as unambiguous.

-
+
 f_parent_saemix_dfop_const <- mkin::saem(f_parent_mkin_const["DFOP", ], quiet = TRUE,
   control = saemix_control, transformations = "saemix")
 plot(f_parent_saemix_dfop_const$so, plot.type = "convergence")

-
+
 print(f_parent_saemix_dfop_const)
Kinetic nonlinear mixed-effects model fit by SAEM
 Structural model:
@@ -277,21 +286,23 @@ DMTA_0    97.99583 96.50079 99.4909
 k1         0.06377  0.03432  0.0932
 k2         0.00848  0.00444  0.0125
 g          0.95701  0.91313  1.0009
-a.1        1.82141  1.65974  1.9831
-SD.DMTA_0  1.64787  0.45779  2.8379
+a.1        1.82141  1.60516  2.0377
+SD.DMTA_0  1.64787  0.45729  2.8384
 SD.k1      0.57439  0.24731  0.9015
-SD.k2      0.03296 -2.50143  2.5673
-SD.g       1.10266  0.32371  1.8816
+SD.k2 0.03296 -2.50524 2.5712 +SD.g 1.10266 0.32354 1.8818

While the other parameters converge to credible values, the variance of k2 (omega2.k2) converges to a very small value. The printout of the saem.mmkin model shows that the estimated standard deviation of k2 across the population of soils (SD.k2) is ill-defined, indicating overparameterisation of this model.

When the DFOP model is fitted with the two-component error model, we also observe that the estimated variance of k2 becomes very small, while being ill-defined, as illustrated by the excessive confidence interval of SD.k2.

-
+
 f_parent_saemix_dfop_tc <- mkin::saem(f_parent_mkin_tc["DFOP", ], quiet = TRUE,
   control = saemix_control, transformations = "saemix")
 f_parent_saemix_dfop_tc_moreiter <- mkin::saem(f_parent_mkin_tc["DFOP", ], quiet = TRUE,
-  control = saemix_control_moreiter, transformations = "saemix")
-plot(f_parent_saemix_dfop_tc$so, plot.type = "convergence")
+ control = saemix_control_moreiter, transformations = "saemix")
+
Likelihood cannot be computed by Importance Sampling.
+
+plot(f_parent_saemix_dfop_tc$so, plot.type = "convergence")

-
+
 print(f_parent_saemix_dfop_tc)
Kinetic nonlinear mixed-effects model fit by SAEM
 Structural model:
@@ -307,21 +318,21 @@ Likelihood computed by importance sampling
   666 664   -323
 
 Fitted parameters:
-          estimate    lower    upper
-DMTA_0    98.27617  96.3088 100.2436
-k1         0.06437   0.0337   0.0950
-k2         0.00880   0.0063   0.0113
-g          0.95249   0.9100   0.9949
-a.1        1.06161   0.8625   1.2607
-b.1        0.02967   0.0226   0.0367
-SD.DMTA_0  2.06075   0.4187   3.7028
-SD.k1      0.59357   0.2561   0.9310
-SD.k2      0.00292 -10.2960  10.3019
-SD.g       1.05725   0.3808   1.7337
+ estimate lower upper +DMTA_0 9.82e+01 96.27937 100.1783 +k1 6.41e-02 0.03333 0.0948 +k2 8.56e-03 0.00608 0.0110 +g 9.55e-01 0.91440 0.9947 +a.1 1.07e+00 0.86542 1.2647 +b.1 2.96e-02 0.02258 0.0367 +SD.DMTA_0 2.04e+00 0.40629 3.6678 +SD.k1 5.98e-01 0.25796 0.9373 +SD.k2 5.28e-04 -58.93251 58.9336 +SD.g 1.04e+00 0.36509 1.7083

Doubling the number of iterations in the first phase of the algorithm leads to a slightly lower likelihood, and therefore to slightly higher AIC and BIC values. With even more iterations, the algorithm stops with an error message. This is related to the variance of k2 approximating zero and has been submitted as a bug to the saemix package, as the algorithm does not converge in this case.

An alternative way to fit DFOP in combination with the two-component error model is to use the model formulation with transformed parameters as used per default in mkin. When using this option, convergence is slower, but eventually the algorithm stops as well with the same error message.

The four combinations (SFO/const, SFO/tc, DFOP/const and DFOP/tc) and the version with increased iterations can be compared using the model comparison function of the saemix package:

-
+
 AIC_parent_saemix <- saemix::compare.saemix(
   f_parent_saemix_sfo_const$so,
   f_parent_saemix_sfo_tc$so,
@@ -329,7 +340,7 @@ SD.g       1.05725   0.3808   1.7337
f_parent_saemix_dfop_tc$so, f_parent_saemix_dfop_tc_moreiter$so)
Likelihoods calculated by importance sampling
-
+
 rownames(AIC_parent_saemix) <- c(
   "SFO const", "SFO tc", "DFOP const", "DFOP tc", "DFOP tc more iterations")
 print(AIC_parent_saemix)
@@ -337,10 +348,10 @@ SD.g 1.05725 0.3808 1.7337
SFO const 796.38 795.34 SFO tc 798.38 797.13 DFOP const 705.75 703.88 -DFOP tc 665.65 663.57 -DFOP tc more iterations 665.88 663.80
+DFOP tc 665.72 663.63 +DFOP tc more iterations NaN NaN

In order to check the influence of the likelihood calculation algorithms implemented in saemix, the likelihood from Gaussian quadrature is added to the best fit, and the AIC values obtained from the three methods are compared.

-
+
 f_parent_saemix_dfop_tc$so <-
   saemix::llgq.saemix(f_parent_saemix_dfop_tc$so)
 AIC_parent_saemix_methods <- c(
@@ -350,9 +361,9 @@ DFOP tc more iterations 665.88 663.80
) print(AIC_parent_saemix_methods)
    is     gq    lin 
-665.65 665.68 665.11 
+665.72 665.88 665.15

The AIC values based on importance sampling and Gaussian quadrature are very similar. Using linearisation is known to be less accurate, but still gives a similar value. In order to illustrate that the comparison of the three method depends on the degree of convergence obtained in the fit, the same comparison is shown below for the fit using the defaults for the number of iterations and the number of MCMC chains.

-
+
 f_parent_saemix_dfop_tc_defaults <- mkin::saem(f_parent_mkin_tc["DFOP", ])
 f_parent_saemix_dfop_tc_defaults$so <-
   saemix::llgq.saemix(f_parent_saemix_dfop_tc_defaults$so)
@@ -363,14 +374,14 @@ DFOP tc more iterations 665.88 663.80
) print(AIC_parent_saemix_methods_defaults)
    is     gq    lin 
-668.27 718.36 666.49 
+668.91 663.61 667.40

Comparison

The following table gives the AIC values obtained with both backend packages using the same control parameters (800 iterations burn-in, 300 iterations second phase, 15 chains). Note that

-
+
 AIC_all <- data.frame(
   check.names = FALSE,
   "Degradation model" = c("SFO", "SFO", "DFOP", "DFOP"),
@@ -395,7 +406,7 @@ DFOP tc more iterations 665.88 663.80
SFO const 796.60 -796.60 +794.17 796.38 @@ -409,15 +420,15 @@ DFOP tc more iterations 665.88 663.80
DFOP const NA -671.98 +704.95 705.75 DFOP tc 671.91 -665.11 -665.65 +665.15 +665.72 @@ -464,7 +475,7 @@ DFOP tc more iterations 665.88 663.80

-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/articles/web_only/mkin_benchmarks.rda b/docs/articles/web_only/mkin_benchmarks.rda new file mode 100644 index 00000000..e26caf64 Binary files /dev/null and b/docs/articles/web_only/mkin_benchmarks.rda differ diff --git a/docs/authors.html b/docs/authors.html index 2f901309..70b1ce8a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -130,7 +130,7 @@ R package version 1.1.0, https://pkgdown
-

Site built with pkgdown 2.0.2.

+

Site built with pkgdown 2.0.3.

diff --git a/docs/index.html b/docs/index.html index 4491b50f..0204d944 100644 --- a/docs/index.html +++ b/docs/index.html @@ -151,7 +151,7 @@
  • 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.
  • -
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
  • +
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) can be specified as error_model = "obs".
  • @@ -214,21 +214,12 @@

    References

    - - - - - - - - - + + +
    -Ranke J, Wöltjen J, Schmidt J, and Comets E (2021) Taking kinetic evaluations of degradation data to the next level with nonlinear mixed-effects models. Environments 8 (8) 71 doi:10.3390/environments8080071 -
    -Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data Environments 6 (12) 124 doi:10.3390/environments6120124 -
    -Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data Environmental Sciences Europe 30 17 doi:10.1186/s12302-018-0145-1 -
    Ranke J, Wöltjen J, Schmidt J, and Comets E (2021) Taking kinetic evaluations of degradation data to the next level with nonlinear mixed-effects models. Environments 8 (8) 71 doi:10.3390/environments8080071 +
    Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data Environments 6 (12) 124 doi:10.3390/environments6120124 +
    Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data Environmental Sciences Europe 30 17 doi:10.1186/s12302-018-0145-1 +
    @@ -292,7 +283,7 @@ Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/news/index.html b/docs/news/index.html index 4776f207..3c90ccad 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -83,11 +83,14 @@
    -
    • ‘dimethenamid_2018’: Update example code to use saemix

    • +
      • ‘vignettes/FOCUS_L.rmd’: Remove an outdated note referring to a failure to calculate the covariance matrix for DFOP with the L2 dataset. Since 0.9.45.5 the covariance matrix is available

      • +
      • ‘vignettes/web_only/benchmarks.rmd’: Add the first benchmark data using my laptop system, therefore add the CPU when showing the benchmark results.

      • +
      • ‘dimethenamid_2018’: Update example code to use saemix

      • ‘CAKE_export’: Check for validity of the map argument, updates

      • ‘saem()’: Slightly improve speed in the case that no analytical solution for saemix is implemented, activate a test of the respective code

      • ‘mean_degparms’: New argument ‘default_log_parms’ that makes it possible to supply a surrogate value (default) for log parameters that fail the t-test

      • ‘plot.mixed.mmkin’: Pass the frame argument also to residual plots, take the ‘default_log_parms’ argument for ‘mean_degparms’ used for constructing approximate population curves, plot population curve last to avoid that it is covered by data

      • +
      • ‘plot.mkinfit’: Respect argument ‘maxabs’ for residual plots, and make it possible to give ylim as a list, for row layouts

    @@ -102,8 +105,7 @@
    -
    • ‘dimethenamid_2018’: Correct the data for the Borstel soil. The five observations from Staudenmaier (2013) that were previously stored as “Borstel 2” are actually just a subset of the 16 observations in “Borstel 1” which is now simply “Borstel”
    • -
    +
    • ‘dimethenamid_2018’: Correct the data for the Borstel soil. The five observations from Staudenmaier (2013) that were previously stored as “Borstel 2” are actually just a subset of the 16 observations in “Borstel 1” which is now simply “Borstel”
    • All plotting functions setting graphical parameters: Use on.exit() for resetting graphical parameters

    • @@ -112,12 +114,10 @@
    -
    • Review and update README, the ‘Introduction to mkin’ vignette and some of the help pages
    • -
    +
    • Review and update README, the ‘Introduction to mkin’ vignette and some of the help pages
    -
    • ‘mkinfit’: Keep model names stored in ‘mkinmod’ objects, avoiding their loss in ‘gmkin’
    • -
    +
    • ‘mkinfit’: Keep model names stored in ‘mkinmod’ objects, avoiding their loss in ‘gmkin’
    • ‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults

    • @@ -172,8 +172,7 @@
    -
    • Increase a test tolerance to make it pass on all CRAN check machines
    • -
    +
    • Increase a test tolerance to make it pass on all CRAN check machines
    • ‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods

    • @@ -288,8 +287,7 @@
    -
    • Remove test_FOMC_ill-defined.R as it is too platform dependent
    • -
    +
    • Remove test_FOMC_ill-defined.R as it is too platform dependent
    • Rename twa to max_twa_parent to avoid conflict with twa from my pfm package

    • @@ -301,8 +299,7 @@

      New features

      -
      • A twa function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).
      • -
      +
      • A twa function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).
    @@ -317,8 +314,7 @@

    Bug fixes

    -
    • The test test_FOMC_ill-defined failed on several architectures, so the test is now skipped
    • -
    +
    • The test test_FOMC_ill-defined failed on several architectures, so the test is now skipped
    @@ -352,8 +348,7 @@

    Major changes

    -
    • Add the argument from_max_mean to mkinfit, for fitting only the decline from the maximum observed value for models with a single observed variable
    • -
    +
    • Add the argument from_max_mean to mkinfit, for fitting only the decline from the maximum observed value for models with a single observed variable

    Minor changes

    • Add plots to compiled_models vignette

    • @@ -373,21 +368,18 @@

      Bug fixes

      • -print.summary.mkinfit(): Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36
      • -
      +print.summary.mkinfit(): Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36

    Bug fixes

    • -endpoints(): For DFOP and SFORB models, where optimize() is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as optimize() sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.
    • -
    +endpoints(): For DFOP and SFORB models, where optimize() is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as optimize() sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.

    Internal changes

    • -DESCRIPTION, NAMESPACE, R/*.R: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.
    • -
    +DESCRIPTION, NAMESPACE, R/*.R: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.
    @@ -399,8 +391,7 @@

    Bug fixes

    • -mkinparplot(): Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.
    • -
    +mkinparplot(): Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.
    @@ -412,8 +403,7 @@

    Bug fixes

    • -mkinmod(): When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.
    • -
    +mkinmod(): When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.
    @@ -426,15 +416,13 @@

    Minor changes

    -
    • Added a simple showcase vignette with an evaluation of FOCUS example dataset D
    • -
    +
    • Added a simple showcase vignette with an evaluation of FOCUS example dataset D

    Major changes

    -
    • Switch from RUnit to testthat for testing
    • -
    +
    • Switch from RUnit to testthat for testing

    Bug fixes

    • mkinparplot(): Avoid warnings that occurred when not all confidence intervals were available in the summary of the fit

    • @@ -516,15 +504,13 @@

      Bug fixes

      -
      • The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in mkinerrmin() used by the summary function.
      • -
      +
      • The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in mkinerrmin() used by the summary function.

    New features

    -
    • It is now possible to use formation fractions in combination with turning off the sink in mkinmod().
    • -
    +
    • It is now possible to use formation fractions in combination with turning off the sink in mkinmod().

    Major changes

    • The original and the transformed parameters now have different names (e.g. k_parent and log_k_parent. They also differ in how many they are when we have formation fractions but no pathway to sink.

    • @@ -607,7 +593,7 @@
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b94f7f0e..e653e88e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ pandoc: 2.9.2.1 -pkgdown: 2.0.2 +pkgdown: 2.0.3 pkgdown_sha: ~ articles: FOCUS_D: FOCUS_D.html @@ -11,7 +11,7 @@ articles: benchmarks: web_only/benchmarks.html compiled_models: web_only/compiled_models.html dimethenamid_2018: web_only/dimethenamid_2018.html -last_built: 2022-04-09T15:50Z +last_built: 2022-05-18T19:26Z 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 a049850d..c46824e6 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -123,6 +123,8 @@ 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 # FOCUS A dataset, as it is well described by SFO @@ -136,17 +138,17 @@ dataframe if there are several fits in the column).

    AIC(f[, "FOCUS A"]) #> df AIC #> SFO 3 55.28197 -#> FOMC 4 57.28222 +#> FOMC 4 57.28198 #> 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.28222 +#> FOMC 4 49.28198 #> 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.59999 +#> FOMC 4 57.59975 #> DFOP 5 59.67918 # For FOCUS C, the more complex models fit better @@ -176,7 +178,7 @@ dataframe if there are several fits in the column).

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/CAKE_export.html b/docs/reference/CAKE_export.html index f16a9e6c..4a0b599b 100644 --- a/docs/reference/CAKE_export.html +++ b/docs/reference/CAKE_export.html @@ -161,7 +161,7 @@ compatible with CAKE.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/D24_2014.html b/docs/reference/D24_2014.html index 1c47c7f7..6e2ec0ba 100644 --- a/docs/reference/D24_2014.html +++ b/docs/reference/D24_2014.html @@ -224,7 +224,7 @@ specific pieces of information in the comments.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index 86df2efc..41a7d256 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -154,7 +154,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 7193e0f9..e00391e8 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -155,7 +155,7 @@ either a list of mkinfit objects or a single mkinfit object.

    ) #> $par #> parent_0 log_alpha log_beta sigma -#> 99.666192 2.549850 5.050586 1.890202 +#> 99.666193 2.549849 5.050586 1.890202 #> #> $objective #> [1] 28.58291 @@ -168,7 +168,7 @@ either a list of mkinfit objects or a single mkinfit object.

    #> #> $evaluations #> function gradient -#> 25 78 +#> 25 72 #> #> $message #> [1] "both X-convergence and relative convergence (5)" @@ -187,7 +187,7 @@ either a list of mkinfit objects or a single mkinfit object.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/FOCUS_2006_datasets.html b/docs/reference/FOCUS_2006_datasets.html index 1e0e270e..aeeaf723 100644 --- a/docs/reference/FOCUS_2006_datasets.html +++ b/docs/reference/FOCUS_2006_datasets.html @@ -144,7 +144,7 @@
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index d507b9c8..7274cadc 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -167,7 +167,7 @@ Technology 24, 1032-1038

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index d30c4e8a..03b30958 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -155,7 +155,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index fec06e0a..0116760d 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -144,7 +144,7 @@ for Evaluating and Calculating Degradation Kinetics in Environmental Media

    print(data.frame(fit.fomc$par, fit.iore$par, fit.iore.deS$par, row.names = paste("model par", 1:4))) #> fit.fomc.par fit.iore.par fit.iore.deS.par -#> model par 1 85.87489063 85.874890 85.874890 +#> model par 1 85.87489063 85.874890 85.874891 #> model par 2 0.05192238 -4.826631 -4.826631 #> model par 3 0.65096665 1.949403 1.949403 #> model par 4 1.85744396 1.857444 1.857444 @@ -170,7 +170,7 @@ for Evaluating and Calculating Degradation Kinetics in Environmental Media

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/NAFTA_SOP_2015.html b/docs/reference/NAFTA_SOP_2015.html index ab3ae7b8..06b5bd6f 100644 --- a/docs/reference/NAFTA_SOP_2015.html +++ b/docs/reference/NAFTA_SOP_2015.html @@ -178,7 +178,7 @@
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png index fa5f3834..ca982688 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 3caf465f..de2d61aa 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 88ebd2d4..f8bf10bb 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 7e87d63d..12d337a4 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 76f25647..014bf258 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 48f5bbd8..bc6979e9 100644 Binary files a/docs/reference/Rplot006.png and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index dfae0f69..3607a5ac 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -147,7 +147,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index 40ed1338..9b4c391c 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -161,7 +161,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index de773982..3a129533 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -208,7 +208,7 @@ https://jrwb.de/posters/piacenza_2015.pdf

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/aw.html b/docs/reference/aw.html index 1182ab8c..1694d5f7 100644 --- a/docs/reference/aw.html +++ b/docs/reference/aw.html @@ -151,7 +151,7 @@ Inference: Understanding AIC and BIC in Model Selection.
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html index 806e94ca..5469f8f8 100644 --- a/docs/reference/confint.mkinfit.html +++ b/docs/reference/confint.mkinfit.html @@ -206,7 +206,7 @@ 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.361 0.964 3.998 +#> 3.409 0.000 3.411 # 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 @@ -214,7 +214,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores)) #> Profiling the likelihood #> user system elapsed -#> 1.473 0.118 0.917 +#> 1.317 0.152 0.847 ci_profile #> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 @@ -281,7 +281,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, ci_quadratic_transformed_ff <- confint(f_d_2, method = "quadratic") ci_quadratic_transformed_ff #> 2.5% 97.5% -#> parent_0 96.403833578 102.79311649 +#> parent_0 96.403833565 102.79311648 #> k_parent 0.090823771 0.10725430 #> k_m1 0.004012219 0.00689755 #> f_parent_to_m1 0.469118824 0.55959615 @@ -289,7 +289,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, ci_quadratic_untransformed_ff <- confint(f_d_2, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed_ff #> 2.5% 97.5% -#> parent_0 96.403833583 1.027931e+02 +#> parent_0 96.403833570 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 @@ -309,17 +309,17 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> sigma TRUE FALSE rel_diffs_transformed_ff #> 2.5% 97.5% -#> parent_0 0.0005408690 0.0002217233 -#> k_parent 0.0009598532 0.0009001864 -#> k_m1 0.0307283041 0.0290588361 -#> f_parent_to_m1 0.0046881769 0.0027780063 +#> parent_0 0.0005408691 0.0002217232 +#> k_parent 0.0009598534 0.0009001862 +#> k_m1 0.0307283050 0.0290588375 +#> f_parent_to_m1 0.0046881765 0.0027780058 #> sigma 0.0550252516 0.0327066836 rel_diffs_untransformed_ff #> 2.5% 97.5% -#> 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 +#> parent_0 0.0005408691 0.0002217231 +#> k_parent 0.0046102157 0.0023732283 +#> k_m1 0.0146740682 0.0025291807 +#> f_parent_to_m1 0.0046995207 0.0023457708 #> sigma 0.0550252516 0.0327066836 # The profiling for the following fit does not finish in a reasonable time, @@ -333,19 +333,19 @@ 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.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 +#> parent_0 94.596210088 106.19935874 +#> k_M1 0.037605436 0.04490756 +#> k_M2 0.008568746 0.01087674 +#> f_parent_to_M1 0.021466645 0.62023879 +#> f_parent_to_M2 0.015168549 0.37975352 +#> k1 0.273897574 0.33388069 +#> k2 0.018614555 0.02250379 +#> g 0.671943815 0.73583258 +#> sigma_low 0.251283808 0.83992121 +#> rsd_high 0.040411010 0.07662004 confint(f_tc_2, "parent_0", method = "quadratic") #> 2.5% 97.5% -#> parent_0 94.59604 106.1995 +#> parent_0 94.59621 106.1994 # } @@ -361,7 +361,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/create_deg_func.html b/docs/reference/create_deg_func.html index 2516edff..36b054fe 100644 --- a/docs/reference/create_deg_func.html +++ b/docs/reference/create_deg_func.html @@ -114,31 +114,21 @@ # \dontrun{ fit_2 <- mkinfit(SFO_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE) if (require(rbenchmark)) - benchmark( + benchmark( analytical = mkinfit(SFO_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE), deSolve = mkinfit(SFO_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), replications = 2) #> Loading required package: rbenchmark -#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.394 1.000 0.393 0 0 -#> 2 deSolve 2 0.678 1.721 0.677 0 0 -#> sys.child -#> 1 0 -#> 2 0 +#> Warning: there is no package called ‘rbenchmark’ DFOP_SFO <- mkinmod( parent = mkinsub("DFOP", "m1"), m1 = mkinsub("SFO")) #> Temporary DLL for differentials generated and loaded - benchmark( + benchmark( analytical = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE), 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.829 1.000 0.829 0 0 -#> 2 deSolve 2 1.559 1.881 1.559 0 0 -#> sys.child -#> 1 0 -#> 2 0 +#> Error in benchmark(analytical = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "analytical", quiet = TRUE), deSolve = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), replications = 2): could not find function "benchmark" # } @@ -154,7 +144,7 @@
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/dimethenamid_2018-1.png b/docs/reference/dimethenamid_2018-1.png index 4300b0c0..6e5d357d 100644 Binary files a/docs/reference/dimethenamid_2018-1.png and b/docs/reference/dimethenamid_2018-1.png differ diff --git a/docs/reference/dimethenamid_2018-2.png b/docs/reference/dimethenamid_2018-2.png index 36db063c..cf5f03f7 100644 Binary files a/docs/reference/dimethenamid_2018-2.png and b/docs/reference/dimethenamid_2018-2.png differ diff --git a/docs/reference/dimethenamid_2018-3.png b/docs/reference/dimethenamid_2018-3.png index efb89bdb..339aaef6 100644 Binary files a/docs/reference/dimethenamid_2018-3.png and b/docs/reference/dimethenamid_2018-3.png differ diff --git a/docs/reference/dimethenamid_2018.html b/docs/reference/dimethenamid_2018.html index d2ed8647..a3cfc271 100644 --- a/docs/reference/dimethenamid_2018.html +++ b/docs/reference/dimethenamid_2018.html @@ -202,9 +202,9 @@ specific pieces of information in the comments.

    summary(f_dmta_saem_tc) #> saemix version used for fitting: 3.0 #> mkin version used for pre-fitting: 1.1.0 -#> R version used for fitting: 4.1.3 -#> Date of fit: Sat Apr 9 18:03:34 2022 -#> Date of summary: Sat Apr 9 18:03:34 2022 +#> R version used for fitting: 4.2.0 +#> Date of fit: Wed May 18 20:37:14 2022 +#> Date of summary: Wed May 18 20:37:14 2022 #> #> Equations: #> d_DMTA/dt = - k_DMTA * DMTA @@ -217,7 +217,7 @@ specific pieces of information in the comments.

    #> #> Model predictions using solution type deSolve #> -#> Fitted in 787.836 s +#> Fitted in 1660.941 s #> Using 300, 100 iterations and 9 chains #> #> Variance model: Two-component variance function @@ -239,65 +239,65 @@ specific pieces of information in the comments.

    #> #> Optimised parameters: #> est. lower upper -#> DMTA_0 88.5943 84.3961 92.7925 -#> log_k_DMTA -3.0466 -3.5609 -2.5322 -#> log_k_M23 -4.0684 -4.9340 -3.2029 -#> log_k_M27 -3.8628 -4.2627 -3.4628 -#> log_k_M31 -3.9803 -4.4804 -3.4801 -#> f_DMTA_ilr_1 0.1304 -0.2186 0.4795 -#> f_DMTA_ilr_2 0.1490 -0.2559 0.5540 -#> f_DMTA_ilr_3 -1.3970 -1.6976 -1.0964 +#> DMTA_0 88.3098 84.1383 92.4813 +#> log_k_DMTA -3.0510 -3.5659 -2.5361 +#> log_k_M23 -4.0567 -4.9178 -3.1955 +#> log_k_M27 -3.8592 -4.2571 -3.4614 +#> log_k_M31 -3.9685 -4.4683 -3.4686 +#> f_DMTA_ilr_1 0.1382 -0.2120 0.4885 +#> f_DMTA_ilr_2 0.1429 -0.2616 0.5473 +#> f_DMTA_ilr_3 -1.3889 -1.6943 -1.0836 #> #> Correlation: #> DMTA_0 l__DMTA lg__M23 lg__M27 lg__M31 f_DMTA__1 f_DMTA__2 -#> log_k_DMTA 0.0309 -#> log_k_M23 -0.0231 -0.0031 -#> log_k_M27 -0.0381 -0.0048 0.0039 -#> log_k_M31 -0.0251 -0.0031 0.0021 0.0830 -#> f_DMTA_ilr_1 -0.0046 -0.0006 0.0417 -0.0437 0.0328 -#> f_DMTA_ilr_2 -0.0008 -0.0002 0.0214 -0.0270 -0.0909 -0.0361 -#> f_DMTA_ilr_3 -0.1832 -0.0135 0.0434 0.0804 0.0395 -0.0070 0.0059 +#> log_k_DMTA 0.0315 +#> log_k_M23 -0.0237 -0.0031 +#> log_k_M27 -0.0392 -0.0048 0.0040 +#> log_k_M31 -0.0257 -0.0032 0.0022 0.0821 +#> f_DMTA_ilr_1 -0.0048 -0.0007 0.0415 -0.0435 0.0333 +#> f_DMTA_ilr_2 -0.0007 -0.0002 0.0214 -0.0270 -0.0900 -0.0372 +#> f_DMTA_ilr_3 -0.1861 -0.0136 0.0431 0.0797 0.0382 -0.0072 0.0066 #> #> Random effects: #> est. lower upper -#> SD.DMTA_0 3.3651 -0.9655 7.6956 -#> SD.log_k_DMTA 0.6415 0.2774 1.0055 -#> SD.log_k_M23 1.0176 0.3809 1.6543 -#> SD.log_k_M27 0.4538 0.1522 0.7554 -#> SD.log_k_M31 0.5684 0.1905 0.9464 -#> SD.f_DMTA_ilr_1 0.4111 0.1524 0.6699 -#> SD.f_DMTA_ilr_2 0.4788 0.1808 0.7768 -#> SD.f_DMTA_ilr_3 0.3501 0.1316 0.5685 +#> SD.DMTA_0 3.2733 -1.1098 7.6564 +#> SD.log_k_DMTA 0.6422 0.2777 1.0066 +#> SD.log_k_M23 1.0131 0.3797 1.6465 +#> SD.log_k_M27 0.4511 0.1510 0.7513 +#> SD.log_k_M31 0.5695 0.1923 0.9466 +#> SD.f_DMTA_ilr_1 0.4123 0.1526 0.6720 +#> SD.f_DMTA_ilr_2 0.4780 0.1804 0.7757 +#> SD.f_DMTA_ilr_3 0.3559 0.1344 0.5775 #> #> Variance model: #> est. lower upper -#> a.1 0.9349 0.8395 1.0302 -#> b.1 0.1344 0.1176 0.1512 +#> a.1 0.9255 0.8288 1.0221 +#> b.1 0.1365 0.1191 0.1538 #> #> Backtransformed parameters: #> est. lower upper -#> DMTA_0 88.59431 84.396147 92.79246 -#> k_DMTA 0.04752 0.028413 0.07948 -#> k_M23 0.01710 0.007198 0.04064 -#> k_M27 0.02101 0.014084 0.03134 -#> k_M31 0.01868 0.011329 0.03080 -#> f_DMTA_to_M23 0.14498 NA NA -#> f_DMTA_to_M27 0.12056 NA NA -#> f_DMTA_to_M31 0.11015 NA NA +#> DMTA_0 88.30980 84.138334 92.48126 +#> k_DMTA 0.04731 0.028272 0.07918 +#> k_M23 0.01731 0.007315 0.04095 +#> k_M27 0.02108 0.014164 0.03139 +#> k_M31 0.01890 0.011467 0.03116 +#> f_DMTA_to_M23 0.14626 NA NA +#> f_DMTA_to_M27 0.12029 NA NA +#> f_DMTA_to_M31 0.11135 NA NA #> #> Resulting formation fractions: #> ff -#> DMTA_M23 0.1450 -#> DMTA_M27 0.1206 -#> DMTA_M31 0.1101 -#> DMTA_sink 0.6243 +#> DMTA_M23 0.1463 +#> DMTA_M27 0.1203 +#> DMTA_M31 0.1113 +#> DMTA_sink 0.6221 #> #> Estimated disappearance times: #> DT50 DT90 -#> DMTA 14.59 48.45 -#> M23 40.52 134.62 -#> M27 32.99 109.60 -#> M31 37.11 123.26 +#> DMTA 14.65 48.67 +#> M23 40.05 133.05 +#> M27 32.88 109.21 +#> M31 36.67 121.81 # As the confidence interval for the random effects of DMTA_0 # includes zero, we could try an alternative model without # such random effects @@ -321,7 +321,7 @@ specific pieces of information in the comments.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index f764b742..883c9e5d 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -178,7 +178,7 @@ HS and DFOP, as well as from Eigenvalues b1 and b2 of any SFORB models

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/experimental_data_for_UBA-1.png b/docs/reference/experimental_data_for_UBA-1.png index b7b4d63b..50c09278 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 e87105b6..69a8baf4 100644 --- a/docs/reference/experimental_data_for_UBA.html +++ b/docs/reference/experimental_data_for_UBA.html @@ -238,7 +238,7 @@ Dataset 12 is from the Renewal Assessment Report (RAR) for thifensulfuron-methyl
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/f_time_norm_focus.html b/docs/reference/f_time_norm_focus.html index eb0e6f73..27da5718 100644 --- a/docs/reference/f_time_norm_focus.html +++ b/docs/reference/f_time_norm_focus.html @@ -194,7 +194,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/focus_soil_moisture.html b/docs/reference/focus_soil_moisture.html index 9189ef76..6b64ba73 100644 --- a/docs/reference/focus_soil_moisture.html +++ b/docs/reference/focus_soil_moisture.html @@ -133,7 +133,7 @@ Version 2.2, May 2014 -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/get_deg_func.html b/docs/reference/get_deg_func.html index 130e786a..c63a968c 100644 --- a/docs/reference/get_deg_func.html +++ b/docs/reference/get_deg_func.html @@ -108,7 +108,7 @@ nlme.mmkin

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index d0cb6372..58ae56b0 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -170,7 +170,7 @@ Compositional Data Using Robust Methods. Math Geosci 40 233-248

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 90387a56..4d657918 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -429,7 +429,7 @@ kinetic models fitted with mkinfit

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/intervals.saem.mmkin.html b/docs/reference/intervals.saem.mmkin.html index ddc565b3..ae621adc 100644 --- a/docs/reference/intervals.saem.mmkin.html +++ b/docs/reference/intervals.saem.mmkin.html @@ -123,7 +123,7 @@ class attribute

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/loftest-3.png b/docs/reference/loftest-3.png index d897c363..a1a65a61 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 0847bbec..c441f2ed 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 a96e6932..ee9b37e4 100644 --- a/docs/reference/loftest.html +++ b/docs/reference/loftest.html @@ -302,7 +302,7 @@ of replicate samples.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/logLik.mkinfit.html b/docs/reference/logLik.mkinfit.html index c41950a3..9c34d890 100644 --- a/docs/reference/logLik.mkinfit.html +++ b/docs/reference/logLik.mkinfit.html @@ -162,7 +162,7 @@ and the fitted error model parameters.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index ed6e29dc..b09d3a69 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -176,20 +176,20 @@ Version 1.1, 18 December 2014 summary(m)$bpar #> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 1.057896e+02 1.9023449590 55.610120 3.768360e-16 1.016451e+02 +#> parent_0 1.057896e+02 1.9023449649 55.610120 3.768361e-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.1718110662 1.317695 1.061043e-01 4.335843e-02 +#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846685e-08 +#> r 2.263946e-01 0.1718110773 1.317695 1.061044e-01 4.335843e-02 #> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 #> Upper #> parent_0 109.9341588 #> kmax 0.1041853 -#> k0 0.4448749 -#> r 1.1821120 +#> k0 0.4448750 +#> r 1.1821121 #> sigma 7.3256566 endpoints(m)$distimes #> DT50 DT90 DT50_k0 DT50_kmax -#> parent 36.86533 62.41511 4297.853 10.83349 +#> parent 36.86533 62.41511 4297.854 10.83349 @@ -205,7 +205,7 @@ Version 1.1, 18 December 2014
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/lrtest.mkinfit.html b/docs/reference/lrtest.mkinfit.html index 6adc1245..bc8dab67 100644 --- a/docs/reference/lrtest.mkinfit.html +++ b/docs/reference/lrtest.mkinfit.html @@ -191,7 +191,7 @@ lower number of fitted parameters (null hypothesis).

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/max_twa_parent.html b/docs/reference/max_twa_parent.html index 29b17d1a..69da881b 100644 --- a/docs/reference/max_twa_parent.html +++ b/docs/reference/max_twa_parent.html @@ -179,7 +179,7 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 9b698e64..97ac647e 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -117,7 +117,7 @@

    Source

    McCall P, Vrona SA, Kelley SS (1981) Fate of uniformly carbon-14 ring labelled 2,4,5-Trichlorophenoxyacetic acid and 2,4-dichlorophenoxyacetic acid. J Agric Chem 29, 100-107 - doi: 10.1021/jf00103a026

    + doi:10.1021/jf00103a026

    @@ -128,19 +128,20 @@ #> Temporary DLL for differentials generated and loaded # \dontrun{ 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.1847074945 47.537272 4.472189e-18 +#> T245_0 1.038550e+02 2.1847074929 47.537272 4.472189e-18 #> k_T245 4.337042e-02 0.0018983965 22.845818 2.276911e-13 -#> 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 +#> k_phenol 4.050581e-01 0.2986993439 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.3985340365 1.562627 6.949413e-02 +#> f_phenol_to_anisole 1.000000e+00 0.6718439498 1.488441 7.867788e-02 +#> sigma 2.514628e+00 0.4907558786 5.123989 6.233156e-05 #> Lower Upper -#> T245_0 99.246061385 1.084640e+02 +#> T245_0 99.246061401 1.084640e+02 #> k_T245 0.039631621 4.746194e-02 -#> k_phenol 0.218013879 7.525762e-01 +#> k_phenol 0.218013878 7.525762e-01 #> k_anisole 0.005370739 8.305299e-03 #> f_T245_to_phenol 0.547559081 6.924813e-01 #> f_phenol_to_anisole 0.000000000 1.000000e+00 @@ -148,13 +149,13 @@ endpoints(fit.1) #> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 3.773626e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 3.195366e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 -#> anisole 103.784093 344.76329 +#> anisole 103.784092 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 @@ -165,31 +166,32 @@ #> Temporary DLL for differentials generated and loaded fit.2 <- mkinfit(SFO_SFO_SFO_2, subset(mccall81_245T, soil == "Commerce"), 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.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 +#> T245_0 1.038550e+02 2.1623653038 48.028439 4.993108e-19 99.271020197 +#> k_T245 4.337042e-02 0.0018343667 23.643268 3.573556e-14 0.039650977 +#> k_phenol 4.050583e-01 0.1177237899 3.440751 1.679257e-03 0.218746592 +#> k_anisole 6.678741e-03 0.0006829745 9.778903 1.872895e-08 0.005377082 +#> f_T245_to_phenol 6.227599e-01 0.0342197865 18.198824 2.039410e-12 0.547975622 #> sigma 2.514628e+00 0.3790944250 6.633250 2.875782e-06 1.710983655 #> Upper -#> T245_0 108.43904074 -#> k_T245 0.04743877 -#> k_phenol 0.75005585 -#> k_anisole 0.00829550 -#> f_T245_to_phenol 0.69212308 -#> sigma 3.31827222 +#> T245_0 1.084390e+02 +#> k_T245 4.743877e-02 +#> k_phenol 7.500560e-01 +#> k_anisole 8.295499e-03 +#> f_T245_to_phenol 6.921231e-01 +#> sigma 3.318272e+00 endpoints(fit.1) #> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 3.773626e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 3.195366e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 -#> anisole 103.784093 344.76329 +#> anisole 103.784092 344.76329 #> plot_sep(fit.2) @@ -208,7 +210,7 @@
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mean_degparms.html b/docs/reference/mean_degparms.html index efe91b6f..bea9f2d8 100644 --- a/docs/reference/mean_degparms.html +++ b/docs/reference/mean_degparms.html @@ -134,7 +134,7 @@ nlme for the case of a single grouping variable ds.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mixed-1.png b/docs/reference/mixed-1.png index 54b81b70..fe7e6c47 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 af73f22a..dfc7a731 100644 --- a/docs/reference/mixed.html +++ b/docs/reference/mixed.html @@ -177,9 +177,9 @@ single dataframe which is convenient for plotting

    #> #> Mean fitted parameters: #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 -#> 100.674757 -8.761916 -0.004347 -3.348812 -3.986853 +#> 100.674757 -8.762456 -0.004347 -3.348812 -3.986853 #> g_qlogis -#> -0.087392 +#> -0.087391 plot(f_mixed) # } @@ -197,7 +197,7 @@ single dataframe which is convenient for plotting

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html index ed0abedd..ba00a80a 100644 --- a/docs/reference/mkin_long_to_wide.html +++ b/docs/reference/mkin_long_to_wide.html @@ -157,7 +157,7 @@ observed values called "value".

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html index 37c84761..0cb9ebca 100644 --- a/docs/reference/mkin_wide_to_long.html +++ b/docs/reference/mkin_wide_to_long.html @@ -139,7 +139,7 @@ column of observed values.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 73a14840..bef3be93 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -145,9 +145,9 @@ and value in order to be compatible with mkinfit

    Public methods

    -


    +


    Method new()

    Create a new mkinds object

    Usage

    @@ -175,7 +175,7 @@ and value in order to be compatible with mkinfit

    -


    +


    Method clone()

    The objects of this class are cloneable with this method.

    Usage

    @@ -220,7 +220,7 @@ and value in order to be compatible with mkinfit

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkindsg.html b/docs/reference/mkindsg.html index 7f4ff290..ceee4f37 100644 --- a/docs/reference/mkindsg.html +++ b/docs/reference/mkindsg.html @@ -142,9 +142,9 @@ or covariates like soil pH).

    Public methods

    -


    +


    Method new()

    Create a new mkindsg object

    Usage

    @@ -172,7 +172,7 @@ or covariates like soil pH).

    -


    +


    Method clone()

    The objects of this class are cloneable with this method.

    Usage

    @@ -406,7 +406,7 @@ or covariates like soil pH).

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinerrmin.html b/docs/reference/mkinerrmin.html index dc2cdab8..b6051ab8 100644 --- a/docs/reference/mkinerrmin.html +++ b/docs/reference/mkinerrmin.html @@ -139,6 +139,7 @@ Document Reference Sanco/10058/2005 version 2.0, 434 pp, #> Temporary DLL for differentials generated and loaded fit_FOCUS_D = mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data round(mkinerrmin(fit_FOCUS_D), 4) #> err.min n.optim df #> All data 0.0640 4 15 @@ -167,7 +168,7 @@ Document Reference Sanco/10058/2005 version 2.0, 434 pp,
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinerrplot-1.png b/docs/reference/mkinerrplot-1.png index 49bb1c0e..852da18d 100644 Binary files a/docs/reference/mkinerrplot-1.png and b/docs/reference/mkinerrplot-1.png differ diff --git a/docs/reference/mkinerrplot.html b/docs/reference/mkinerrplot.html index 95206b61..4b78f6eb 100644 --- a/docs/reference/mkinerrplot.html +++ b/docs/reference/mkinerrplot.html @@ -164,6 +164,7 @@ lines of the mkinfit object.

    model <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) #> Temporary DLL for differentials generated and loaded fit <- mkinfit(model, FOCUS_2006_D, error_model = "tc", quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data mkinerrplot(fit) # } @@ -182,7 +183,7 @@ lines of the mkinfit object.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index c006ddab..e5bf1203 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -307,7 +307,7 @@ internal rate transformation.

    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 +doi:10.3390/environments6120124 .

    @@ -330,16 +330,16 @@ doi: fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit) #> mkin version used for fitting: 1.1.0 -#> R version used for fitting: 4.1.2 -#> Date of fit: Mon Mar 7 13:11:56 2022 -#> Date of summary: Mon Mar 7 13:11:56 2022 +#> R version used for fitting: 4.2.0 +#> Date of fit: Wed May 18 20:37:57 2022 +#> Date of summary: Wed May 18 20:37:57 2022 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 222 model solutions performed in 0.045 s +#> Fitted using 222 model solutions performed in 0.041 s #> #> Error model: Constant variance #> @@ -374,10 +374,10 @@ doi: #> #> Parameter correlation: #> parent_0 log_alpha log_beta sigma -#> 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 +#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.770e-08 +#> log_alpha -1.565e-01 1.000e+00 9.564e-01 9.974e-08 +#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.468e-08 +#> sigma 4.770e-08 9.974e-08 8.468e-08 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -462,7 +462,7 @@ doi: #> $distimes #> DT50 DT90 #> parent 6.89313 22.89848 -#> m1 134.15634 445.65772 +#> m1 134.15634 445.65770 #> # We can show a quick (only one replication) benchmark for this case, as we @@ -471,7 +471,7 @@ doi: # benchmark vignette # \dontrun{ if(require(rbenchmark)) { - benchmark(replications = 1, order = "relative", columns = c("test", "relative", "elapsed"), + benchmark(replications = 1, order = "relative", columns = c("test", "relative", "elapsed"), deSolve_compiled = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = "tc", solution_type = "deSolve", use_compiled = TRUE), eigen = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = "tc", @@ -479,10 +479,8 @@ doi: analytical = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = "tc", solution_type = "analytical")) } -#> test relative elapsed -#> 3 analytical 1.000 0.573 -#> 1 deSolve_compiled 1.642 0.941 -#> 2 eigen 2.517 1.442 +#> Loading required package: rbenchmark +#> Warning: there is no package called ‘rbenchmark’ # } # Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO @@ -506,10 +504,13 @@ doi: # 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: diag(.) had 0 or NA entries; non-finite result is doubtful #> mkin version used for fitting: 1.1.0 -#> R version used for fitting: 4.1.2 -#> Date of fit: Mon Mar 7 13:12:07 2022 -#> Date of summary: Mon Mar 7 13:12:07 2022 +#> R version used for fitting: 4.2.0 +#> Date of fit: Wed May 18 20:38:07 2022 +#> Date of summary: Wed May 18 20:38:07 2022 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -518,12 +519,12 @@ doi: #> #> Model predictions using solution type deSolve #> -#> Fitted using 3729 model solutions performed in 2.67 s +#> Fitted using 3924 model solutions performed in 7.107 s #> #> Error model: Two-component variance function #> #> Error model algorithm: d_3 -#> Direct fitting and three-step fitting yield approximately the same likelihood +#> Three-step fitting yielded a higher likelihood than direct fitting #> #> Starting values for parameters to be optimised: #> value type @@ -558,7 +559,7 @@ doi: #> 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 +#> f_parent_qlogis 0.001426 0.0766900 -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 @@ -566,31 +567,31 @@ doi: #> #> Parameter correlation: #> 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 +#> parent_0 1.000000 -0.095145 -0.76674 0.70541 NaN +#> log_k_m1 -0.095145 1.000000 0.51428 -0.14381 NaN +#> f_parent_qlogis -0.766743 0.514278 1.00000 -0.61392 NaN +#> log_alpha 0.705413 -0.143809 -0.61392 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 0.016077 0.001586 0.01548 5.87034 NaN +#> rsd_high 0.006617 -0.011694 -0.05356 0.04848 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 +#> parent_0 0.016077 0.006617 +#> log_k_m1 0.001586 -0.011694 +#> f_parent_qlogis 0.015476 -0.053560 +#> log_alpha 5.870339 0.048481 #> log_beta NaN NaN -#> sigma_low 1.000000 -0.652558 -#> rsd_high -0.652558 1.000000 +#> sigma_low 1.000000 -0.652555 +#> rsd_high -0.652555 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.7800 6.311e-26 9.624e+01 1.070e+02 +#> parent_0 1.016e+02 32.7800 6.312e-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 +#> f_parent_to_m1 5.004e-01 20.8300 4.318e-20 4.613e-01 5.394e-01 +#> alpha 2.502e+02 0.5624 2.890e-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 @@ -630,7 +631,7 @@ doi:
    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 72a9ea52..3a29b39b 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -258,6 +258,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

    # \dontrun{ fit_sfo_sfo <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, solution_type = "deSolve") +#> Warning: Observations with value of zero were removed from the data # Now supplying compound names used for plotting, and write to user defined location # We need to choose a path outside the session tempdir because this gets removed @@ -267,13 +268,14 @@ 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/Rtmp1TiIZY/file1180516cafe4a2.so to /home/jranke/.local/share/mkin/SFO_SFO.so +#> Copied DLL from /tmp/RtmpkcKjUM/file8dd657f864c2.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) SFO_SFO.3 <- readRDS("~/SFO_SFO.rds") fit_sfo_sfo <- mkinfit(SFO_SFO.3, FOCUS_2006_D, quiet = TRUE, solution_type = "deSolve") +#> Warning: Observations with value of zero were removed from the data # Show details of creating the C function SFO_SFO <- mkinmod( @@ -319,7 +321,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

    #> }) #> return(predicted) #> } -#> <environment: 0x55555f6c4cd8> +#> <environment: 0x55cc1a5f8ad8> # If we have several parallel metabolites # (compare tests/testthat/test_synthetic_data_for_UBA_2014.R) @@ -348,7 +350,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png index fff98391..69d9ac75 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 2e787240..b9eda413 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -117,6 +117,7 @@ effect, namely to produce a plot.

    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) # } @@ -134,7 +135,7 @@ effect, namely to produce a plot.

    -

    Site built with pkgdown 2.0.2.

    +

    Site built with pkgdown 2.0.3.

    diff --git a/docs/reference/mkinplot.html b/docs/reference/mkinplot.html index 79599787..cad5b35f 100644 --- a/docs/reference/mkinplot.html +++ b/docs/reference/mkinplot.html @@ -120,7 +120,7 @@ plot.mkinfit.">