From 78d34a8918edcb91982a3886e4898a63898f52c3 Mon Sep 17 00:00:00 2001
From: Johannes Ranke 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
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.
+stopCluster(cl)
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.
-++) +cl_path_1 <- start_cluster(n_cores)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) -)
To obtain suitable starting values for the NLHM fits, separate pathway fits are performed for all datasets.
-+
+
The model comparison below suggests that the pathway fits using DFOP or SFORB for the parent compound provide the best fit.
-+
For these two parent model, successful fits are shown below. Plots of the fits with the other parent models are shown in the Appendix.
-+plot(f_saem_1[["dfop_path_1", "tc"]])
--+plot(f_saem_1[["sforb_path_1", "tc"]])
-A closer graphical analysis of these Figures shows that the residues of transformation product JCZ38 in the soils Tama and Nambsheim observed at later time points are strongly and systematically underestimated.
++stopCluster(cl_path_1)
Alternative pathway fits @@ -1744,7 +1757,7 @@ corresponding amide (Addendum 2014, p. 109). As FOMC provided the best fit for the parent, and the biexponential models DFOP and SFORB provided the best initial pathway fits, these three parent models are used in the alternative pathway fits. -
+@@ -1820,7 +1835,7 @@ alternative pathway fits.cyan_path_2 <- list( fomc_path_2 = mkinmod( cyan = mkinsub("FOMC", c("JCZ38", "J9Z38")), @@ -1774,11 +1787,13 @@ alternative pathway fits. overwrite = TRUE ) ) + +cl_path_2 <- start_cluster(n_cores) f_sep_2_const <- mmkin( cyan_path_2, cyan_ds, error_model = "const", - cluster = cl, + cluster = cl_path_2, quiet = TRUE) status(f_sep_2_const) |> kable()
Using constant variance, separate fits converge with the exception of the fits to the Sassafras soil data.
-+
The hierarchical fits for the alternative pathway completed successfully.
-+
+
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 + | +
NEWS.md
‘R/{endpoints,parms,plot.mixed.mmkin,summary.saem.mmkin}.R’: Calculate parameters and endpoints and plot population curves for specific covariate values, or specific percentiles of covariate values used in saem fits.
All plotting functions setting graphical parameters: Use on.exit() for resetting graphical parameters
‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults
‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods
test_FOMC_ill-defined.R
as it is too platform dependentRename twa
to max_twa_parent
to avoid conflict with twa
from my pfm
package
twa
function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).twa
function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).test_FOMC_ill-defined
failed on several architectures, so the test is now skippedtest_FOMC_ill-defined
failed on several architectures, so the test is now skippedfrom_max_mean
to mkinfit
, for fitting only the decline from the maximum observed value for models with a single observed variablefrom_max_mean
to mkinfit
, for fitting only the decline from the maximum observed value for models with a single observed variableAdd plots to compiled_models
vignette
print.summary.mkinfit()
: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36print.summary.mkinfit()
: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36
+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.
+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.
+
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.
+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.
+mkinparplot()
: Avoid warnings that occurred when not all confidence intervals were available in the summary of the fit
mkinerrmin()
used by the summary function.mkinerrmin()
used by the summary function.mkinmod()
.mkinmod()
.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.