From d0a358a8f4fd03c95536409523e492eb15726f44 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 4 Mar 2019 10:12:43 +0100 Subject: Review tests and examples based on winbuilder results Static documentation rebuilt by pkgdown --- docs/articles/web_only/FOCUS_Z.html | 174 ++++----- docs/articles/web_only/NAFTA_examples.html | 533 +++++++++++++++------------- docs/articles/web_only/compiled_models.html | 86 ++--- 3 files changed, 416 insertions(+), 377 deletions(-) (limited to 'docs/articles/web_only') diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html index 1926662a..79e39e55 100644 --- a/docs/articles/web_only/FOCUS_Z.html +++ b/docs/articles/web_only/FOCUS_Z.html @@ -88,7 +88,7 @@

Example evaluation of FOCUS dataset Z

Johannes Ranke

-

2019-02-26

+

2019-03-04

@@ -102,33 +102,35 @@

The data

The following code defines the example dataset from Appendix 7 to the FOCUS kinetics report (FOCUS Work Group on Degradation Kinetics 2014, 354).

-
library(mkin, quietly = TRUE)
-LOD = 0.5
-FOCUS_2006_Z = data.frame(
-  t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21,
-        42, 61, 96, 124),
-  Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8,
-         2.9, 3.5, 5.3, 4.4, 1.2, 0.7),
-  Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1,
-         1.6, 0.6, 0.5 * LOD, NA, NA, NA),
-  Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5,
-         0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA),
-  Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5,
-         25.2, 17.2, 4.8, 4.5, 2.8, 4.4))
-
-FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z)
+
library(mkin, quietly = TRUE)
+LOD = 0.5
+FOCUS_2006_Z = data.frame(
+  t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21,
+        42, 61, 96, 124),
+  Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8,
+         2.9, 3.5, 5.3, 4.4, 1.2, 0.7),
+  Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1,
+         1.6, 0.6, 0.5 * LOD, NA, NA, NA),
+  Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5,
+         0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA),
+  Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5,
+         25.2, 17.2, 4.8, 4.5, 2.8, 4.4))
+
+FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z)

Parent and one metabolite

The next step is to set up the models used for the kinetic analysis. As the simultaneous fit of parent and the first metabolite is usually straightforward, Step 1 (SFO for parent only) is skipped here. We start with the model 2a, with formation and decline of metabolite Z1 and the pathway from parent directly to sink included (default in mkin).

-
Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"),
-                Z1 = mkinsub("SFO"))
+
Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"),
+                Z1 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.2a)
+
m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.2a)

-
summary(m.Z.2a, data = FALSE)$bpar
+
summary(m.Z.2a, data = FALSE)$bpar
+
## Warning in summary.mkinfit(m.Z.2a, data = FALSE): Could not estimate
+## covariance matrix; singular system.
##             Estimate se_notrans    t value     Pr(>t) Lower Upper
 ## Z0_0      9.7015e+01   3.553140 2.7304e+01 1.6793e-21    NA    NA
 ## k_Z0_sink 1.2790e-11   0.226895 5.6368e-11 5.0000e-01    NA    NA
@@ -136,14 +138,16 @@
 ## k_Z1_sink 4.8212e-01   0.065854 7.3212e+00 3.5520e-08    NA    NA

As obvious from the parameter summary (the component of the summary), the kinetic rate constant from parent compound Z to sink is very small and the t-test for this parameter suggests that it is not significantly different from zero. This suggests, in agreement with the analysis in the FOCUS kinetics report, to simplify the model by removing the pathway to sink.

A similar result can be obtained when formation fractions are used in the model formulation:

- +
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.2a.ff)
+
m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.2a.ff)

-
summary(m.Z.2a.ff, data = FALSE)$bpar
+
summary(m.Z.2a.ff, data = FALSE)$bpar
+
## Warning in summary.mkinfit(m.Z.2a.ff, data = FALSE): Could not estimate
+## covariance matrix; singular system.
##            Estimate se_notrans t value     Pr(>t) Lower Upper
 ## Z0_0       97.01488   3.553145 27.3039 1.6793e-21    NA    NA
 ## k_Z0        2.23601   0.216849 10.3114 3.6623e-11    NA    NA
@@ -152,13 +156,13 @@
 

Here, the ilr transformed formation fraction fitted in the model takes a very large value, and the backtransformed formation fraction from parent Z to Z1 is practically unity. Here, the covariance matrix used for the calculation of confidence intervals is not returned as the model is overparameterised.

A simplified model is obtained by removing the pathway to the sink.

In the following, we use the parameterisation with formation fractions in order to be able to compare with the results in the FOCUS guidance, and as it makes it easier to use parameters obtained in a previous fit when adding a further metabolite.

-
Z.3 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
-               Z1 = mkinsub("SFO"), use_of_ff = "max")
+
Z.3 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
+               Z1 = mkinsub("SFO"), use_of_ff = "max")
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.3)
+
m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.3)

-
summary(m.Z.3, data = FALSE)$bpar
+
summary(m.Z.3, data = FALSE)$bpar
##      Estimate se_notrans t value     Pr(>t)    Lower   Upper
 ## Z0_0 97.01488   2.681772  36.176 2.3636e-25 91.52152 102.508
 ## k_Z0  2.23601   0.146861  15.225 2.2464e-15  1.95453   2.558
@@ -169,28 +173,28 @@
 

Metabolites Z2 and Z3

As suggested in the FOCUS report, the pathway to sink was removed for metabolite Z1 as well in the next step. While this step appears questionable on the basis of the above results, it is followed here for the purpose of comparison. Also, in the FOCUS report, it is assumed that there is additional empirical evidence that Z1 quickly and exclusively hydrolyses to Z2.

-
Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
-               Z1 = mkinsub("SFO", "Z2", sink = FALSE),
-               Z2 = mkinsub("SFO"), use_of_ff = "max")
+
Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
+               Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+               Z2 = mkinsub("SFO"), use_of_ff = "max")
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.5)
+
m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.5)

Finally, metabolite Z3 is added to the model. We use the optimised differential equation parameter values from the previous fit in order to accelerate the optimization.

-
Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
-                   Z1 = mkinsub("SFO", "Z2", sink = FALSE),
-                   Z2 = mkinsub("SFO", "Z3"),
-                   Z3 = mkinsub("SFO"),
-                   use_of_ff = "max")
+
Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
+                   Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+                   Z2 = mkinsub("SFO", "Z3"),
+                   Z3 = mkinsub("SFO"),
+                   use_of_ff = "max")
## Successfully compiled differential equation model from auto-generated C code.
- +
## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation by method Port did not converge:
 ## false convergence (8)
-
plot_sep(m.Z.FOCUS)
+
plot_sep(m.Z.FOCUS)

-
summary(m.Z.FOCUS, data = FALSE)$bpar
+
summary(m.Z.FOCUS, data = FALSE)$bpar
##             Estimate se_notrans t value     Pr(>t)     Lower      Upper
 ## Z0_0       96.837112   2.058861 47.0343 5.5877e-44 92.703779 100.970445
 ## k_Z0        2.215368   0.118098 18.7587 7.6563e-25  1.990525   2.465609
@@ -198,7 +202,7 @@
 ## k_Z2        0.451617   0.044214 10.2144 3.1133e-14  0.371034   0.549702
 ## k_Z3        0.058693   0.014296  4.1056 7.2924e-05  0.035994   0.095705
 ## f_Z2_to_Z3  0.471516   0.057057  8.2639 2.8156e-11  0.360381   0.585548
-
endpoints(m.Z.FOCUS)
+
endpoints(m.Z.FOCUS)
## $ff
 ##   Z2_Z3 Z2_sink 
 ## 0.47152 0.52848 
@@ -219,61 +223,63 @@
 Using the SFORB model
 

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"))
+
Z.mkin.1 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE),
+                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+                    Z2 = mkinsub("SFO", "Z3"),
+                    Z3 = mkinsub("SFORB"))
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.mkin.1)
+
m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.mkin.1)

-
summary(m.Z.mkin.1, data = FALSE)$cov.unscaled
+
summary(m.Z.mkin.1, data = FALSE)$cov.unscaled
+
## Warning in summary.mkinfit(m.Z.mkin.1, data = FALSE): Could not estimate
+## covariance matrix; singular system.
## 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"))
+
Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
+                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+                    Z2 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
-
m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE)
-plot_sep(m.Z.mkin.3)
+
m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE)
+plot_sep(m.Z.mkin.3)

This results in a much better representation of the behaviour of the parent compound Z0.

Finally, Z3 is added as well. These models appear overparameterised (no covariance matrix returned) if the sink for Z1 is left in the models.

-
Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
-                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
-                    Z2 = mkinsub("SFO", "Z3"),
-                    Z3 = mkinsub("SFO"))
+
Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
+                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+                    Z2 = mkinsub("SFO", "Z3"),
+                    Z3 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
- +

The error level of the fit, but especially of metabolite Z3, can be improved if the SFORB model is chosen for this metabolite, as this model is capable of representing the tailing of the metabolite decline phase.

-
Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
-                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
-                    Z2 = mkinsub("SFO", "Z3"),
-                    Z3 = mkinsub("SFORB"))
+
Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
+                    Z1 = mkinsub("SFO", "Z2", sink = FALSE),
+                    Z2 = mkinsub("SFO", "Z3"),
+                    Z3 = mkinsub("SFORB"))
## Successfully compiled differential equation model from auto-generated C code.
- +

The summary view of the backtransformed parameters shows that we get no confidence intervals due to overparameterisation. As the optimized is excessively small, it seems reasonable to fix it to zero.

-
m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin,
-                       parms.ini = c(m.Z.mkin.5$bparms.ode[1:7],
-                                     k_Z3_bound_free = 0),
-                       fixed_parms = "k_Z3_bound_free",
-                       quiet = TRUE)
-plot_sep(m.Z.mkin.5a)
+
m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin,
+                       parms.ini = c(m.Z.mkin.5$bparms.ode[1:7],
+                                     k_Z3_bound_free = 0),
+                       fixed_parms = "k_Z3_bound_free",
+                       quiet = TRUE)
+plot_sep(m.Z.mkin.5a)

As expected, the residual plots for Z0 and Z3 are more random than in the case of the all SFO model for which they were shown above. In conclusion, the model is proposed as the best-fit model for the dataset from Appendix 7 of the FOCUS report.

A graphical representation of the confidence intervals can finally be obtained.

-
mkinparplot(m.Z.mkin.5a)
+
mkinparplot(m.Z.mkin.5a)

The endpoints obtained with this model are

-
endpoints(m.Z.mkin.5a)
+
endpoints(m.Z.mkin.5a)
## $ff
 ##   Z0_free_Z1        Z1_Z2      Z2_sink   Z2_Z3_free Z3_free_sink 
 ##      1.00000      1.00000      0.46344      0.53656      1.00000 
diff --git a/docs/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html
index cae0cd6b..db1fc478 100644
--- a/docs/articles/web_only/NAFTA_examples.html
+++ b/docs/articles/web_only/NAFTA_examples.html
@@ -88,7 +88,7 @@
       

Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance

Johannes Ranke

-

2019-02-26

+

2019-03-04

@@ -110,12 +110,14 @@

Example on page 5, upper panel

-
p5a <- nafta(NAFTA_SOP_Attachment[["p5a"]])
+
p5a <- nafta(NAFTA_SOP_Attachment[["p5a"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p5a)
+
plot(p5a)

-
print(p5a)
+
print(p5a)
## Sums of squares:
 ##       SFO      IORE      DFOP 
 ## 465.21753  56.27506  32.06401 
@@ -125,22 +127,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                  Estimate       Pr(>t)        Lower       Upper
-## parent_0      95.84012168 1.095639e-21 92.120517864 99.55972549
-## k_parent_sink  0.01024015 1.710227e-12  0.008996874  0.01165524
+##               Estimate   Pr(>t)  Lower   Upper
+## parent_0       95.8401 1.10e-21 92.121 99.5597
+## k_parent_sink   0.0102 1.71e-12  0.009  0.0117
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            1.007532e+02 2.365797e-26 9.891170e+01 1.025947e+02
-## k__iore_parent_sink 1.544192e-05 8.733384e-02 3.482391e-06 6.847393e-05
-## N_parent            2.569877e+00 1.140446e-11 2.215298e+00 2.924456e+00
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            1.01e+02 2.37e-26 9.89e+01 1.03e+02
+## k__iore_parent_sink 1.54e-05 8.73e-02 3.48e-06 6.85e-05
+## N_parent            2.57e+00 1.14e-11 2.22e+00 2.92e+00
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 9.994630e+01 4.330861e-27    NA    NA
-## k1       2.674255e-02 3.171390e-05    NA    NA
-## k2       2.161318e-12 5.000000e-01    NA    NA
-## g        6.465276e-01 2.129114e-05    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 9.99e+01 4.33e-27    NA    NA
+## k1       2.67e-02 3.17e-05    NA    NA
+## k2       2.16e-12 5.00e-01    NA    NA
+## g        6.47e-01 2.13e-05    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -155,12 +157,14 @@
 

Example on page 5, lower panel

-
p5b <- nafta(NAFTA_SOP_Attachment[["p5b"]])
+
p5b <- nafta(NAFTA_SOP_Attachment[["p5b"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p5b)
+
plot(p5b)

-
print(p5b)
+
print(p5b)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 94.81123 10.10936  7.55871 
@@ -170,22 +174,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      96.497133849 2.623748e-25 94.776528606 98.217739092
-## k_parent_sink  0.008002704 1.352275e-14  0.007356108  0.008706135
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0        96.497 2.62e-25 94.77653 98.21774
+## k_parent_sink    0.008 1.35e-14  0.00736  0.00871
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            9.854518e+01 1.019174e-29 9.780760e+01 9.928276e+01
-## k__iore_parent_sink 1.532766e-04 1.152046e-02 6.603390e-05 3.557826e-04
-## N_parent            1.939125e+00 8.177751e-13 1.741616e+00 2.136633e+00
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            9.85e+01 1.02e-29 9.78e+01 9.93e+01
+## k__iore_parent_sink 1.53e-04 1.15e-02 6.60e-05 3.56e-04
+## N_parent            1.94e+00 8.18e-13 1.74e+00 2.14e+00
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 9.836323e+01 1.896304e-28    NA    NA
-## k1       1.546859e-02 2.833415e-03    NA    NA
-## k2       8.172408e-12 5.000000e-01    NA    NA
-## g        6.889941e-01 1.306276e-02    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 9.84e+01 1.90e-28    NA    NA
+## k1       1.55e-02 2.83e-03    NA    NA
+## k2       8.17e-12 5.00e-01    NA    NA
+## g        6.89e-01 1.31e-02    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -200,12 +204,14 @@
 

Example on page 6

-
p6 <- nafta(NAFTA_SOP_Attachment[["p6"]])
+
p6 <- nafta(NAFTA_SOP_Attachment[["p6"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p6)
+
plot(p6)

-
print(p6)
+
print(p6)
## Sums of squares:
 ##       SFO      IORE      DFOP 
 ## 188.45361  51.00699  42.46931 
@@ -215,22 +221,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                  Estimate       Pr(>t)       Lower       Upper
-## parent_0      94.77587412 1.246335e-24 92.25575879 97.29598945
-## k_parent_sink  0.01794259 2.347664e-16  0.01660595  0.01938682
+##               Estimate   Pr(>t)   Lower   Upper
+## parent_0       94.7759 1.25e-24 92.2558 97.2960
+## k_parent_sink   0.0179 2.35e-16  0.0166  0.0194
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            97.124460863 5.616271e-27 95.493434421 98.755487305
-## k__iore_parent_sink  0.002517728 3.535472e-03  0.001263771  0.005015906
-## N_parent             1.495871465 6.129227e-13  1.323799338  1.667943591
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            97.12446 5.62e-27 95.49343 98.75549
+## k__iore_parent_sink  0.00252 3.54e-03  0.00126  0.00502
+## N_parent             1.49587 6.13e-13  1.32380  1.66794
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 9.662275e+01 4.174516e-26    NA    NA
-## k1       2.547327e-02 2.115246e-05    NA    NA
-## k2       3.087623e-11 5.000000e-01    NA    NA
-## g        8.613785e-01 2.097173e-05    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 9.66e+01 4.17e-26    NA    NA
+## k1       2.55e-02 2.12e-05    NA    NA
+## k2       3.09e-11 5.00e-01    NA    NA
+## g        8.61e-01 2.10e-05    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -245,12 +251,14 @@
 

Example on page 7

-
p7 <- nafta(NAFTA_SOP_Attachment[["p7"]])
+
p7 <- nafta(NAFTA_SOP_Attachment[["p7"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p7)
+
plot(p7)

-
print(p7)
+
print(p7)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 3661.661 3195.030 3174.145 
@@ -260,22 +268,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      96.417960406 1.520951e-53 93.295541980 99.540378832
-## k_parent_sink  0.007350054 3.592731e-21  0.006413446  0.008423441
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0      96.41796 1.52e-53 93.29554 99.54038
+## k_parent_sink  0.00735 3.59e-21  0.00641  0.00842
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            9.915322e+01 7.332574e-49 9.534934e+01 1.029571e+02
-## k__iore_parent_sink 1.600884e-05 3.472978e-01 9.982484e-08 2.567328e-03
-## N_parent            2.446000e+00 6.141482e-05 1.260173e+00 3.631827e+00
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            9.92e+01 7.33e-49 9.53e+01 1.03e+02
+## k__iore_parent_sink 1.60e-05 3.47e-01 9.98e-08 2.57e-03
+## N_parent            2.45e+00 6.14e-05 1.26e+00 3.63e+00
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 9.886065e+01 8.134302e-48    NA    NA
-## k1       1.805928e-02 2.198367e-01    NA    NA
-## k2       3.279731e-10 5.000000e-01    NA    NA
-## g        6.063177e-01 2.601365e-01    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 9.89e+01 8.13e-48    NA    NA
+## k1       1.81e-02 2.20e-01    NA    NA
+## k2       3.28e-10 5.00e-01    NA    NA
+## g        6.06e-01 2.60e-01    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -295,12 +303,17 @@
 

Example on page 8

For this dataset, the IORE fit does not converge when the default starting values used by mkin for the IORE model are used. Therefore, a lower value for the rate constant is used here.

-
p8 <- nafta(NAFTA_SOP_Attachment[["p8"]], parms.ini = c(k__iore_parent_sink = 1e-3))
+
p8 <- nafta(NAFTA_SOP_Attachment[["p8"]], parms.ini = c(k__iore_parent_sink = 1e-3))
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
+
+## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p8)
+
plot(p8)

-
print(p8)
+
print(p8)
## Sums of squares:
 ##       SFO      IORE      DFOP 
 ## 1996.9408  444.9237  547.5616 
@@ -310,31 +323,31 @@
 ## 
 ## Parameters:
 ## $SFO
-##                         Estimate Pr(>t) Lower Upper
-## parent_0            88.165489334     NA    NA    NA
-## k__iore_parent_sink  0.001000000     NA    NA    NA
-## k_parent_sink        0.008032303     NA    NA    NA
+##                     Estimate Pr(>t) Lower Upper
+## parent_0            88.16549     NA    NA    NA
+## k__iore_parent_sink  0.00100     NA    NA    NA
+## k_parent_sink        0.00803     NA    NA    NA
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            9.771060e+01 1.048016e-35 9.442778e+01 1.009934e+02
-## k__iore_parent_sink 6.141041e-05 2.763666e-02 2.205805e-05 1.709688e-04
-## N_parent            2.271648e+00 5.996684e-19 2.015215e+00 2.528080e+00
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            9.77e+01 1.05e-35 9.44e+01 1.01e+02
+## k__iore_parent_sink 6.14e-05 2.76e-02 2.21e-05 1.71e-04
+## N_parent            2.27e+00 6.00e-19 2.02e+00 2.53e+00
 ## 
 ## $DFOP
-##                         Estimate Pr(>t) Lower Upper
-## parent_0            95.706193520     NA    NA    NA
-## k__iore_parent_sink  0.001000000     NA    NA    NA
-## k1                   0.024995243     NA    NA    NA
-## k2                   0.002734623     NA    NA    NA
-## g                    0.588349874     NA    NA    NA
+##                     Estimate Pr(>t) Lower Upper
+## parent_0            95.70619     NA    NA    NA
+## k__iore_parent_sink  0.00100     NA    NA    NA
+## k1                   0.02500     NA    NA    NA
+## k2                   0.00273     NA    NA    NA
+## g                    0.58835     NA    NA    NA
 ## 
 ## 
 ## DTx values:
 ##      DT50 DT90 DT50_rep
 ## SFO  86.3  287     86.3
 ## IORE 53.4  668    201.0
-## DFOP 55.6  517    253.0
+## DFOP 55.6  517    253.5
 ## 
 ## Representative half-life:
 ## [1] 201.0316
@@ -346,12 +359,14 @@

Example on page 9, upper panel

-
p9a <- nafta(NAFTA_SOP_Attachment[["p9a"]])
+
p9a <- nafta(NAFTA_SOP_Attachment[["p9a"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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(p9a)
+
plot(p9a)

-
print(p9a)
+
print(p9a)
## Sums of squares:
 ##       SFO      IORE      DFOP 
 ## 839.35238  88.57064   9.93363 
@@ -361,22 +376,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                 Estimate       Pr(>t)       Lower       Upper
-## parent_0      88.1933161 1.117569e-12 79.76708923 96.61954288
-## k_parent_sink  0.0409019 9.501453e-08  0.03258829  0.05133639
+##               Estimate   Pr(>t)   Lower   Upper
+## parent_0       88.1933 1.12e-12 79.7671 96.6195
+## k_parent_sink   0.0409 9.50e-08  0.0326  0.0513
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            9.891481e+01 5.163566e-17 9.497891e+01 1.028507e+02
-## k__iore_parent_sink 1.927824e-05 1.480158e-01 2.650455e-06 1.402214e-04
-## N_parent            2.910027e+00 3.738041e-09 2.428904e+00 3.391151e+00
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            9.89e+01 5.16e-17 9.50e+01 1.03e+02
+## k__iore_parent_sink 1.93e-05 1.48e-01 2.65e-06 1.40e-04
+## N_parent            2.91e+00 3.74e-09 2.43e+00 3.39e+00
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 9.853112e+01 1.308505e-21    NA    NA
-## k1       1.382145e-01 3.630589e-09    NA    NA
-## k2       6.019228e-13 5.000000e-01    NA    NA
-## g        6.518659e-01 1.502543e-10    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 9.85e+01 1.31e-21    NA    NA
+## k1       1.38e-01 3.63e-09    NA    NA
+## k2       6.02e-13 5.00e-01    NA    NA
+## g        6.52e-01 1.50e-10    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -392,12 +407,14 @@
 

Example on page 9, lower panel

-
p9b <- nafta(NAFTA_SOP_Attachment[["p9b"]])
+
p9b <- nafta(NAFTA_SOP_Attachment[["p9b"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p9b)

-
print(p9b)
+
print(p9b)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 35.64867 23.22334 35.64867 
@@ -407,22 +424,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                  Estimate       Pr(>t)      Lower       Upper
-## parent_0      94.71226787 2.207090e-20 93.0673253 96.35721040
-## k_parent_sink  0.03887215 1.482921e-14  0.0368549  0.04099981
+##               Estimate   Pr(>t)   Lower  Upper
+## parent_0       94.7123 2.21e-20 93.0673 96.357
+## k_parent_sink   0.0389 1.48e-14  0.0369  0.041
 ## 
 ## $IORE
-##                       Estimate       Pr(>t)       Lower      Upper
-## parent_0            93.8626223 2.911881e-19 92.29955547 95.4256890
-## k__iore_parent_sink  0.1271399 2.725876e-02  0.04570569  0.3536663
-## N_parent             0.7108771 3.130915e-05  0.46052920  0.9612249
+##                     Estimate   Pr(>t)   Lower  Upper
+## parent_0              93.863 2.91e-19 92.2996 95.426
+## k__iore_parent_sink    0.127 2.73e-02  0.0457  0.354
+## N_parent               0.711 3.13e-05  0.4605  0.961
 ## 
 ## $DFOP
-##             Estimate Pr(>t) Lower Upper
-## parent_0 94.71226786     NA    NA    NA
-## k1        0.03887215     NA    NA    NA
-## k2        0.03887215     NA    NA    NA
-## g         0.77417779     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0  94.7123     NA    NA    NA
+## k1         0.0389     NA    NA    NA
+## k2         0.0389     NA    NA    NA
+## g          0.7742     NA    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -438,12 +455,14 @@
 

Example on page 10

-
p10 <- nafta(NAFTA_SOP_Attachment[["p10"]])
+
p10 <- nafta(NAFTA_SOP_Attachment[["p10"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p10)

-
print(p10)
+
print(p10)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 899.4089 336.4348 899.4089 
@@ -453,29 +472,29 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)       Lower        Upper
-## parent_0      101.73153064 4.954950e-11 90.96832870 112.49473259
-## k_parent_sink   0.04952864 3.398569e-07  0.03930194   0.06241642
+##               Estimate   Pr(>t)   Lower    Upper
+## parent_0      101.7315 4.95e-11 90.9683 112.4947
+## k_parent_sink   0.0495 3.40e-07  0.0393   0.0624
 ## 
 ## $IORE
-##                      Estimate       Pr(>t)      Lower       Upper
-## parent_0            96.855416 2.706118e-12 89.8843855 103.8264461
-## k__iore_parent_sink  2.960977 1.308097e-01  0.4609504  19.0202303
-## N_parent             0.000000 5.000000e-01 -0.4728922   0.4728922
+##                     Estimate   Pr(>t)  Lower   Upper
+## parent_0               96.86 2.71e-12 89.884 103.826
+## k__iore_parent_sink     2.96 1.31e-01  0.461  19.020
+## N_parent                0.00 5.00e-01 -0.473   0.473
 ## 
 ## $DFOP
-##              Estimate Pr(>t) Lower Upper
-## parent_0 101.73153022     NA    NA    NA
-## k1         0.04952864     NA    NA    NA
-## k2         0.04952864     NA    NA    NA
-## g          0.66344649     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0 101.7315     NA    NA    NA
+## k1         0.0495     NA    NA    NA
+## k2         0.0495     NA    NA    NA
+## g          0.6634     NA    NA    NA
 ## 
 ## 
 ## DTx values:
 ##      DT50 DT90 DT50_rep
-## SFO  14.0 46.5    14.00
+## SFO  14.0 46.5    13.99
 ## IORE 16.4 29.4     8.86
-## DFOP 14.0 46.5    14.00
+## DFOP 14.0 46.5    13.99
 ## 
 ## Representative half-life:
 ## [1] 8.862193
@@ -488,12 +507,14 @@

Example on page 11

-
p11 <- nafta(NAFTA_SOP_Attachment[["p11"]])
+
p11 <- nafta(NAFTA_SOP_Attachment[["p11"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p11)

-
print(p11)
+
print(p11)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 579.6805 204.7932 144.7783 
@@ -503,22 +524,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      96.158200840 1.560217e-13 89.913728706 1.024027e+02
-## k_parent_sink  0.003208498 5.266271e-05  0.002183575 4.714497e-03
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0      96.15820 1.56e-13 89.91373 1.02e+02
+## k_parent_sink  0.00321 5.27e-05  0.00218 4.71e-03
 ## 
 ## $IORE
-##                         Estimate Pr(>t)        Lower        Upper
-## parent_0            1.045981e+02     NA 9.798102e+01 1.112151e+02
-## k__iore_parent_sink 3.110367e-17     NA 6.875825e-25 1.407014e-09
-## N_parent            8.360812e+00     NA 4.397006e+00 1.232462e+01
+##                     Estimate Pr(>t)    Lower    Upper
+## parent_0            1.05e+02     NA 9.80e+01 1.11e+02
+## k__iore_parent_sink 3.11e-17     NA 6.88e-25 1.41e-09
+## N_parent            8.36e+00     NA 4.40e+00 1.23e+01
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 1.045607e+02 7.502642e-13    NA    NA
-## k1       4.414526e-02 3.343950e-02    NA    NA
-## k2       7.246905e-13 5.000000e-01    NA    NA
-## g        3.217737e-01 7.868540e-03    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 1.05e+02 7.50e-13    NA    NA
+## k1       4.41e-02 3.34e-02    NA    NA
+## k2       7.25e-13 5.00e-01    NA    NA
+## g        3.22e-01 7.87e-03    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -539,12 +560,14 @@
 

Example on page 12, upper panel

-
p12a <- nafta(NAFTA_SOP_Attachment[["p12a"]])
+
p12a <- nafta(NAFTA_SOP_Attachment[["p12a"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p12a)

-
print(p12a)
+
print(p12a)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 695.4440 220.0685 695.4440 
@@ -554,22 +577,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                  Estimate       Pr(>t)      Lower       Upper
-## parent_0      100.5206988 5.606929e-12 91.6867692 109.3546284
-## k_parent_sink   0.1243142 7.235485e-08  0.1017305   0.1519113
+##               Estimate   Pr(>t)  Lower   Upper
+## parent_0       100.521 5.61e-12 91.687 109.355
+## k_parent_sink    0.124 7.24e-08  0.102   0.152
 ## 
 ## $IORE
-##                       Estimate       Pr(>t)       Lower       Upper
-## parent_0            96.8234045 1.242894e-13 91.56908085 102.0777281
-## k__iore_parent_sink  2.4360714 3.893118e-02  0.78536982   7.5562415
-## N_parent             0.2627157 3.639503e-02 -0.02875633   0.5541876
+##                     Estimate   Pr(>t)   Lower   Upper
+## parent_0              96.823 1.24e-13 91.5691 102.078
+## k__iore_parent_sink    2.436 3.89e-02  0.7854   7.556
+## N_parent               0.263 3.64e-02 -0.0288   0.554
 ## 
 ## $DFOP
-##             Estimate Pr(>t) Lower Upper
-## parent_0 100.5206988     NA    NA    NA
-## k1         0.1243142     NA    NA    NA
-## k2         0.1243142     NA    NA    NA
-## g          0.8772377     NA    NA    NA
+##          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.877     NA    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -584,12 +607,14 @@
 

Example on page 12, lower panel

-
p12b <- nafta(NAFTA_SOP_Attachment[["p12b"]])
+
p12b <- nafta(NAFTA_SOP_Attachment[["p12b"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p12b)

-
print(p12b)
+
print(p12b)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 58.90242 19.06353 58.90242 
@@ -599,29 +624,29 @@
 ## 
 ## Parameters:
 ## $SFO
-##                 Estimate       Pr(>t)       Lower        Upper
-## parent_0      97.6840211 0.0000535970 86.32050115 109.04754103
-## k_parent_sink  0.0589177 0.0009869932  0.04320553   0.08034377
+##               Estimate   Pr(>t)   Lower    Upper
+## parent_0       97.6840 5.36e-05 86.3205 109.0475
+## k_parent_sink   0.0589 9.87e-04  0.0432   0.0803
 ## 
 ## $IORE
-##                       Estimate       Pr(>t)       Lower      Upper
-## parent_0            95.5232270 0.0003860431 84.09629121 106.950163
-## k__iore_parent_sink  0.3329365 0.1708863327  0.01026046  10.803285
-## N_parent             0.5677771 0.0548808046 -0.31606833   1.451622
+##                     Estimate   Pr(>t)   Lower  Upper
+## parent_0              95.523 0.000386 84.0963 106.95
+## k__iore_parent_sink    0.333 0.170886  0.0103  10.80
+## N_parent               0.568 0.054881 -0.3161   1.45
 ## 
 ## $DFOP
-##            Estimate Pr(>t) Lower Upper
-## parent_0 97.6840212     NA    NA    NA
-## k1        0.0589177     NA    NA    NA
-## k2        0.0589177     NA    NA    NA
-## g         0.6901929     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0  97.6840     NA    NA    NA
+## k1         0.0589     NA    NA    NA
+## k2         0.0589     NA    NA    NA
+## g          0.6902     NA    NA    NA
 ## 
 ## 
 ## DTx values:
 ##      DT50 DT90 DT50_rep
-## SFO  11.8 39.1    11.80
+## SFO  11.8 39.1    11.76
 ## IORE 12.9 31.4     9.46
-## DFOP 11.8 39.1    11.80
+## DFOP 11.8 39.1    11.76
 ## 
 ## Representative half-life:
 ## [1] 9.461912
@@ -629,12 +654,14 @@

Example on page 13

-
p13 <- nafta(NAFTA_SOP_Attachment[["p13"]])
+
p13 <- nafta(NAFTA_SOP_Attachment[["p13"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p13)

-
print(p13)
+
print(p13)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 174.5971 142.3951 174.5971 
@@ -644,22 +671,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      92.735003006 1.453426e-17 89.389064698 96.080941315
-## k_parent_sink  0.002581189 2.630396e-09  0.002198171  0.003030945
+##               Estimate   Pr(>t)   Lower    Upper
+## parent_0      92.73500 1.45e-17 89.3891 96.08094
+## k_parent_sink  0.00258 2.63e-09  0.0022  0.00303
 ## 
 ## $IORE
-##                        Estimate       Pr(>t)       Lower     Upper
-## parent_0            91.60158658 2.932498e-16 88.08710837 95.116065
-## k__iore_parent_sink  0.03960674 2.810573e-01  0.00102485  1.530656
-## N_parent             0.35408757 1.972378e-01 -0.51942545  1.227601
+##                     Estimate   Pr(>t)    Lower Upper
+## parent_0             91.6016 2.93e-16 88.08711 95.12
+## k__iore_parent_sink   0.0396 2.81e-01  0.00102  1.53
+## N_parent              0.3541 1.97e-01 -0.51943  1.23
 ## 
 ## $DFOP
-##              Estimate Pr(>t) Lower Upper
-## parent_0 92.735003208     NA    NA    NA
-## k1        0.002581186     NA    NA    NA
-## k2        0.002581188     NA    NA    NA
-## g         0.004422859     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0 92.73500     NA    NA    NA
+## k1        0.00258     NA    NA    NA
+## k2        0.00258     NA    NA    NA
+## g         0.00442     NA    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -675,12 +702,14 @@
 

DT50 not observed in the study and DFOP problems in PestDF

-
p14 <- nafta(NAFTA_SOP_Attachment[["p14"]])
+
p14 <- nafta(NAFTA_SOP_Attachment[["p14"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p14)

-
print(p14)
+
print(p14)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 48.43249 28.67746 27.26248 
@@ -690,22 +719,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      99.471243637 1.708290e-31 98.373131052 1.005694e+02
-## k_parent_sink  0.002789581 2.222078e-15  0.002554583 3.046197e-03
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0      99.47124 1.71e-31 98.37313 1.01e+02
+## k_parent_sink  0.00279 2.22e-15  0.00255 3.05e-03
 ## 
 ## $IORE
-##                         Estimate Pr(>t)        Lower        Upper
-## parent_0            1.003522e+02     NA 9.926773e+01 1.014366e+02
-## k__iore_parent_sink 9.443770e-08     NA 6.810412e-11 1.309536e-04
-## N_parent            3.308552e+00     NA 1.690051e+00 4.927053e+00
+##                     Estimate Pr(>t)    Lower    Upper
+## parent_0            1.00e+02     NA 9.93e+01 1.01e+02
+## k__iore_parent_sink 9.44e-08     NA 6.81e-11 1.31e-04
+## N_parent            3.31e+00     NA 1.69e+00 4.93e+00
 ## 
 ## $DFOP
-##              Estimate       Pr(>t) Lower Upper
-## parent_0 1.003398e+02 2.698790e-28    NA    NA
-## k1       9.532677e-03 3.394353e-01    NA    NA
-## k2       9.189935e-12 5.000000e-01    NA    NA
-## g        3.982564e-01 3.920847e-01    NA    NA
+##          Estimate   Pr(>t) Lower Upper
+## parent_0 1.00e+02 2.70e-28    NA    NA
+## k1       9.53e-03 3.39e-01    NA    NA
+## k2       9.19e-12 5.00e-01    NA    NA
+## g        3.98e-01 3.92e-01    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -721,12 +750,14 @@
 

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

-
p15a <- nafta(NAFTA_SOP_Attachment[["p15a"]])
+
p15a <- nafta(NAFTA_SOP_Attachment[["p15a"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p15a)

-
print(p15a)
+
print(p15a)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 245.5248 135.0132 245.5248 
@@ -736,22 +767,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower       Upper
-## parent_0      97.967511635 4.984358e-16 94.038286642 101.8967366
-## k_parent_sink  0.009522227 5.239115e-09  0.008126698   0.0111574
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0      97.96751 4.98e-16 94.03829 101.8967
+## k_parent_sink  0.00952 5.24e-09  0.00813   0.0112
 ## 
 ## $IORE
-##                       Estimate       Pr(>t)       Lower      Upper
-## parent_0            95.8736780 8.295860e-16 92.58018331 99.1671726
-## k__iore_parent_sink  0.6285106 2.386496e-01  0.03155477 12.5187302
-## N_parent             0.0000000 5.000000e-01 -0.72189225  0.7218923
+##                     Estimate   Pr(>t)   Lower  Upper
+## parent_0              95.874 8.30e-16 92.5802 99.167
+## k__iore_parent_sink    0.629 2.39e-01  0.0316 12.519
+## N_parent               0.000 5.00e-01 -0.7219  0.722
 ## 
 ## $DFOP
-##              Estimate Pr(>t) Lower Upper
-## parent_0 97.967516468     NA    NA    NA
-## k1        0.009522243     NA    NA    NA
-## k2        0.009522223     NA    NA    NA
-## g         0.172466840     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0 97.96752     NA    NA    NA
+## k1        0.00952     NA    NA    NA
+## k2        0.00952     NA    NA    NA
+## g         0.17247     NA    NA    NA
 ## 
 ## 
 ## DTx values:
@@ -762,12 +793,14 @@
 ## 
 ## Representative half-life:
 ## [1] 41.32749
-
p15b <- nafta(NAFTA_SOP_Attachment[["p15b"]])
+
p15b <- nafta(NAFTA_SOP_Attachment[["p15b"]])
+
## Warning in summary.mkinfit(x): Could not estimate covariance matrix;
+## singular system.
## 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)
+
plot(p15b)

-
print(p15b)
+
print(p15b)
## Sums of squares:
 ##       SFO      IORE      DFOP 
 ## 106.91629  68.55574 106.91629 
@@ -777,29 +810,29 @@
 ## 
 ## Parameters:
 ## $SFO
-##                   Estimate       Pr(>t)        Lower        Upper
-## parent_0      1.008816e+02 4.987925e-18 98.127607367 1.036355e+02
-## k_parent_sink 4.856586e-03 1.756208e-10  0.004316334 5.464459e-03
+##               Estimate   Pr(>t)    Lower    Upper
+## parent_0      1.01e+02 4.99e-18 98.12761 1.04e+02
+## k_parent_sink 4.86e-03 1.76e-10  0.00432 5.46e-03
 ## 
 ## $IORE
-##                       Estimate       Pr(>t)       Lower     Upper
-## parent_0            99.8268283 4.490292e-17 97.19753163 102.45613
-## k__iore_parent_sink  0.3799625 3.406003e-01  0.00206198  70.01593
-## N_parent             0.0000000 5.000000e-01 -1.20105017   1.20105
+##                     Estimate   Pr(>t)    Lower Upper
+## parent_0               99.83 4.49e-17 97.19753 102.5
+## k__iore_parent_sink     0.38 3.41e-01  0.00206  70.0
+## N_parent                0.00 5.00e-01 -1.20105   1.2
 ## 
 ## $DFOP
-##              Estimate Pr(>t) Lower Upper
-## parent_0 1.008816e+02     NA    NA    NA
-## k1       4.856586e-03     NA    NA    NA
-## k2       4.856586e-03     NA    NA    NA
-## g        1.496838e-01     NA    NA    NA
+##          Estimate Pr(>t) Lower Upper
+## parent_0 1.01e+02     NA    NA    NA
+## k1       4.86e-03     NA    NA    NA
+## k2       4.86e-03     NA    NA    NA
+## g        1.50e-01     NA    NA    NA
 ## 
 ## 
 ## DTx values:
 ##      DT50 DT90 DT50_rep
-## SFO   143  474    143.0
+## SFO   143  474    142.7
 ## IORE  131  236     71.2
-## DFOP  143  474    143.0
+## DFOP  143  474    142.7
 ## 
 ## Representative half-life:
 ## [1] 71.18014
@@ -808,14 +841,14 @@

The DFOP fraction parameter is greater than 1

-
p16 <- nafta(NAFTA_SOP_Attachment[["p16"]])
+
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)
+
plot(p16)

-
print(p16)
+
print(p16)
## Sums of squares:
 ##      SFO     IORE     DFOP 
 ## 3831.804 2062.008 1550.980 
@@ -825,22 +858,22 @@
 ## 
 ## Parameters:
 ## $SFO
-##                 Estimate       Pr(>t)      Lower      Upper
-## parent_0      71.9528227 3.923531e-14 61.0870510 82.8185944
-## k_parent_sink  0.1594518 2.271601e-06  0.1110583  0.2289327
+##               Estimate   Pr(>t)  Lower  Upper
+## parent_0        71.953 3.92e-14 61.087 82.819
+## k_parent_sink    0.159 2.27e-06  0.111  0.229
 ## 
 ## $IORE
-##                         Estimate       Pr(>t)        Lower        Upper
-## parent_0            8.738846e+01 1.739390e-16 7.706991e+01 97.707005461
-## k__iore_parent_sink 4.549683e-04 2.282721e-01 3.008533e-05  0.006880303
-## N_parent            2.696278e+00 1.869479e-08 1.966442e+00  3.426114200
+##                     Estimate   Pr(>t)    Lower    Upper
+## parent_0            8.74e+01 1.74e-16 7.71e+01 97.70701
+## k__iore_parent_sink 4.55e-04 2.28e-01 3.01e-05  0.00688
+## N_parent            2.70e+00 1.87e-08 1.97e+00  3.42611
 ## 
 ## $DFOP
-##             Estimate Pr(>t)       Lower      Upper
-## parent_0 88.53333334     NA 79.36733990 97.6993268
-## k1       18.55624337     NA  0.00000000        Inf
-## k2        0.07759679     NA  0.04709945  0.1278414
-## g         0.47333008     NA  0.31375096  0.6385506
+##          Estimate Pr(>t)   Lower  Upper
+## parent_0  88.5333     NA 79.3673 97.699
+## k1        18.5562     NA  0.0000    Inf
+## k2         0.0776     NA  0.0471  0.128
+## g          0.4733     NA  0.3138  0.639
 ## 
 ## 
 ## DTx values:
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html
index 3d49d262..1d96ea76 100644
--- a/docs/articles/web_only/compiled_models.html
+++ b/docs/articles/web_only/compiled_models.html
@@ -88,7 +88,7 @@
       

Performance benefit by using compiled model definitions in mkin

Johannes Ranke

-

2019-02-26

+

2019-03-04

@@ -101,37 +101,37 @@

Model that can also be solved with Eigenvalues

This evaluation is taken from the example section of mkinfit. When using an mkin version equal to or greater than 0.9-36 and a C compiler (gcc) is available, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. The mkinmod() function checks for presence of the gcc compiler using

-
Sys.which("gcc")
+
Sys.which("gcc")
##            gcc 
 ## "/usr/bin/gcc"

First, we build a simple degradation model for a parent compound with one metabolite.

-
library("mkin", quietly = TRUE)
-SFO_SFO <- mkinmod(
-  parent = mkinsub("SFO", "m1"),
-  m1 = mkinsub("SFO"))
+
library("mkin", quietly = TRUE)
+SFO_SFO <- mkinmod(
+  parent = mkinsub("SFO", "m1"),
+  m1 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.

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.

- +
## Lade nötiges Paket: rbenchmark
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   2.309    1.000     2.307        0
-## 1 deSolve, not compiled            3  17.535    7.594    17.527        0
-## 2      Eigenvalue based            3   2.846    1.233     2.844        0
+## 3     deSolve, compiled            3   2.313    1.000     2.312        0
+## 1 deSolve, not compiled            3  17.602    7.610    17.595        0
+## 2      Eigenvalue based            3   2.853    1.233     2.851        0
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
@@ -142,26 +142,26 @@
 

Model that can not be solved with Eigenvalues

This evaluation is also taken from the example section of mkinfit.

-
if (require(rbenchmark)) {
-  FOMC_SFO <- mkinmod(
-    parent = mkinsub("FOMC", "m1"),
-    m1 = mkinsub( "SFO"))
-
-  b.2 <- benchmark(
-    "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D,
-                                      use_compiled = FALSE, quiet = TRUE),
-    "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
-    replications = 3)
-  print(b.2)
-  factor_FOMC_SFO <- round(b.2["1", "relative"])
-} else {
-  factor_FOMC_SFO <- NA
-  print("R package benchmark is not available")
-}
+
if (require(rbenchmark)) {
+  FOMC_SFO <- mkinmod(
+    parent = mkinsub("FOMC", "m1"),
+    m1 = mkinsub( "SFO"))
+
+  b.2 <- benchmark(
+    "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D,
+                                      use_compiled = FALSE, quiet = TRUE),
+    "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE),
+    replications = 3)
+  print(b.2)
+  factor_FOMC_SFO <- round(b.2["1", "relative"])
+} else {
+  factor_FOMC_SFO <- NA
+  print("R package benchmark is not available")
+}
## Successfully compiled differential equation model from auto-generated C code.
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   4.071    1.000     4.069        0
-## 1 deSolve, not compiled            3  37.139    9.123    37.123        0
+## 2     deSolve, compiled            3   4.049    1.000     4.047        0
+## 1 deSolve, not compiled            3  37.135    9.171    37.119        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
-- cgit v1.2.1