From 78d34a8918edcb91982a3886e4898a63898f52c3 Mon Sep 17 00:00:00 2001
From: Johannes Ranke
Date: Thu, 20 Apr 2023 21:40:08 +0200
Subject: Update vignettes in dev docs
After the post-release fixes to the release version online docs
---
docs/dev/articles/index.html | 2 +-
docs/dev/articles/prebuilt/2022_cyan_pathway.html | 360 +++++++++++----------
.../figure-html/unnamed-chunk-13-1.png | Bin 363662 -> 363943 bytes
.../figure-html/unnamed-chunk-14-1.png | Bin 0 -> 365867 bytes
.../figure-html/unnamed-chunk-15-1.png | Bin 0 -> 363662 bytes
.../figure-html/unnamed-chunk-20-1.png | Bin 0 -> 378667 bytes
.../figure-html/unnamed-chunk-21-1.png | Bin 0 -> 372548 bytes
.../figure-html/unnamed-chunk-22-1.png | Bin 0 -> 373913 bytes
.../figure-html/unnamed-chunk-7-1.png | Bin 373913 -> 373737 bytes
.../figure-html/unnamed-chunk-8-1.png | Bin 0 -> 373913 bytes
docs/dev/articles/prebuilt/2022_dmta_pathway.html | 79 +++--
.../figure-html/unnamed-chunk-6-1.png | Bin 400319 -> 393985 bytes
.../figure-html/unnamed-chunk-7-1.png | Bin 403164 -> 400319 bytes
.../figure-html/unnamed-chunk-8-1.png | Bin 0 -> 403164 bytes
docs/dev/articles/web_only/multistart.html | 52 +--
.../figure-html/unnamed-chunk-3-1.png | Bin 64221 -> 66934 bytes
.../figure-html/unnamed-chunk-4-1.png | Bin 52914 -> 53020 bytes
.../figure-html/unnamed-chunk-5-1.png | Bin 22142 -> 22355 bytes
18 files changed, 270 insertions(+), 223 deletions(-)
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-14-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-15-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-20-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-21-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-22-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-8-1.png
create mode 100644 docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-8-1.png
(limited to 'docs/dev/articles')
diff --git a/docs/dev/articles/index.html b/docs/dev/articles/index.html
index 2aacc53a..c9116643 100644
--- a/docs/dev/articles/index.html
+++ b/docs/dev/articles/index.html
@@ -17,7 +17,7 @@
mkin
- 1.2.3
+ 1.2.4
diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway.html b/docs/dev/articles/prebuilt/2022_cyan_pathway.html
index 875f5ac9..7bb0fa5b 100644
--- a/docs/dev/articles/prebuilt/2022_cyan_pathway.html
+++ b/docs/dev/articles/prebuilt/2022_cyan_pathway.html
@@ -34,7 +34,7 @@
mkin
- 1.2.3
+ 1.2.4
@@ -135,8 +135,8 @@ residue data on cyantraniliprole
Johannes
Ranke
- Last change on 6 January
-2023, last compiled on 16 April 2023
+ Last change on 20 April 2023,
+last compiled on 20 April 2023
Source: vignettes/prebuilt/2022_cyan_pathway.rmd
2022_cyan_pathway.rmd
@@ -156,7 +156,7 @@ be fitted with the mkin package.
173340 (Application of nonlinear hierarchical models to the kinetic
evaluation of chemical degradation data) of the German Environment
Agency carried out in 2022 and 2023.
-The mkin package is used in version 1.2.3 which is currently under
+
The mkin package is used in version 1.2.4 which is currently under
development. The newly introduced functionality that is used here is a
simplification of excluding random effects for a set of fits based on a
related set of fits with a reduced model, and the documentation of the
@@ -174,11 +174,19 @@ processing, the parallel
package is used.
library(saemix)
library(parallel)
n_cores <- detectCores()
-if (Sys.info()["sysname"] == "Windows") {
- cl <- makePSOCKcluster(n_cores)
-} else {
- cl <- makeForkCluster(n_cores)
-}
+
+# We need to start a new cluster after defining a compiled model that is
+# saved as a DLL to the user directory, therefore we define a function
+# This is used again after defining the pathway model
+start_cluster <- function(n_cores) {
+ if (Sys.info()["sysname"] == "Windows") {
+ ret <- makePSOCKcluster(n_cores)
+ } else {
+ ret <- makeForkCluster(n_cores)
+ }
+ return(ret)
+}
+cl <- start_cluster(n_cores)
Test data
@@ -1366,6 +1374,8 @@ when the two-component error model is used.
two-component error model is preferable for all parent models with the
exception of DFOP. The lowest AIC and BIC values are are obtained with
the FOMC model, followed by SFORB and DFOP.
+
Pathway fits
@@ -1378,7 +1388,7 @@ degradation models with different transformation pathway models, a list
of mkinmod
models is set up below. As in the EU evaluation,
parallel formation of metabolites JCZ38 and J9Z38 and secondary
formation of metabolite JSE76 from JCZ38 is used.
-
+
if (!dir.exists("cyan_dlls")) dir.create("cyan_dlls")
cyan_path_1 <- list(
sfo_path_1 = mkinmod(
@@ -1411,15 +1421,16 @@ formation of metabolite JSE76 from JCZ38 is used.
J9Z38 = mkinsub("SFO"),
JSE76 = mkinsub("SFO"), quiet = TRUE,
name = "hs_path_1", dll_dir = "cyan_dlls", overwrite = TRUE)
-)
+)
+cl_path_1 <- start_cluster(n_cores)
To obtain suitable starting values for the NLHM fits, separate
pathway fits are performed for all datasets.
-
+
f_sep_1_const <- mmkin(
cyan_path_1,
cyan_ds,
error_model = "const",
- cluster = cl,
+ cluster = cl_path_1,
quiet = TRUE)
status(f_sep_1_const) |> kable()
@@ -1474,7 +1485,7 @@ pathway fits are performed for all datasets.
-
+
f_sep_1_tc <- update(f_sep_1_const, error_model = "tc")
status(f_sep_1_tc) |> kable()
@@ -1539,11 +1550,11 @@ for the parent only fits is used as an argument
no_random_effect
to the mhmkin
function. The
possibility to do so was introduced in mkin version 1.2.2
which is currently under development.
-
+
f_saem_1 <- mhmkin(list(f_sep_1_const, f_sep_1_tc),
no_random_effect = illparms(cyan_saem_full),
- cluster = cl)
-
+
Using constant variance, separate fits converge with the exception of
the fits to the Sassafras soil data.
-
+
f_sep_2_tc <- update(f_sep_2_const, error_model = "tc")
status(f_sep_2_tc) |> kable()
@@ -1862,11 +1877,11 @@ the fits to the Sassafras soil data.
Using the two-component error model, all separate fits converge with
the exception of the alternative pathway fit with DFOP used for the
parent and the Sassafras dataset.
-
+
f_saem_2 <- mhmkin(list(f_sep_2_const, f_sep_2_tc),
no_random_effect = illparms(cyan_saem_full[2:4, ]),
- cluster = cl)
-
+
The hierarchical fits for the alternative pathway completed
successfully.
-
+
@@ -1928,7 +1943,7 @@ successfully.
In both fits, the random effects for the formation fractions for the
pathways from JCZ38 to JSE76, and for the reverse pathway from JSE76 to
JCZ38 are ill-defined.
-