From dd6c4a8f895fd470345e7ae773299daaa4de7aef Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 22 Feb 2019 20:51:13 +0100 Subject: Implement the NAFTA evaluation scheme --- docs/articles/FOCUS_D.html | 6 +- docs/articles/FOCUS_L.html | 42 ++--- docs/articles/web_only/compiled_models.html | 12 +- docs/news/index.html | 7 +- docs/reference/Extract.mmkin.html | 12 +- docs/reference/NAFTA_2015_datasets-1.png | Bin 0 -> 41450 bytes docs/reference/NAFTA_2015_datasets.html | 213 +++++++++++++++++++++++++ docs/reference/mccall81_245T.html | 12 +- docs/reference/mkinfit.html | 46 +++--- docs/reference/mkinmod.html | 2 +- docs/reference/mkinpredict.html | 6 +- docs/reference/mmkin.html | 4 +- docs/reference/nafta-1.png | Bin 0 -> 41450 bytes docs/reference/nafta.html | 239 ++++++++++++++++++++++++++++ docs/reference/plot.nafta.html | 190 ++++++++++++++++++++++ docs/reference/print.nafta.html | 178 +++++++++++++++++++++ docs/reference/summary.mkinfit.html | 6 +- docs/reference/transform_odeparms.html | 24 +-- 18 files changed, 910 insertions(+), 89 deletions(-) create mode 100644 docs/reference/NAFTA_2015_datasets-1.png create mode 100644 docs/reference/NAFTA_2015_datasets.html create mode 100644 docs/reference/nafta-1.png create mode 100644 docs/reference/nafta.html create mode 100644 docs/reference/plot.nafta.html create mode 100644 docs/reference/print.nafta.html (limited to 'docs') diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 38e59d9d..ad8413dc 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -163,8 +163,8 @@
summary(fit)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:20 2019 
-## Date of summary: Fri Feb 22 09:51:21 2019 
+## Date of fit:     Fri Feb 22 20:48:30 2019 
+## Date of summary: Fri Feb 22 20:48:31 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
@@ -172,7 +172,7 @@
 ## 
 ## Model predictions using solution type deSolve 
 ## 
-## Fitted with method Port using 153 model solutions performed in 0.693 s
+## Fitted with method Port using 153 model solutions performed in 0.731 s
 ## 
 ## Weighting: none
 ## 
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 13131315..17c7bf59 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -111,15 +111,15 @@
 summary(m.L1.SFO)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:22 2019 
-## Date of summary: Fri Feb 22 09:51:22 2019 
+## Date of fit:     Fri Feb 22 20:48:32 2019 
+## Date of summary: Fri Feb 22 20:48:32 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 37 model solutions performed in 0.095 s
+## Fitted with method Port using 37 model solutions performed in 0.105 s
 ## 
 ## Weighting: none
 ## 
@@ -202,15 +202,15 @@
 
summary(m.L1.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:24 2019 
-## Date of summary: Fri Feb 22 09:51:24 2019 
+## Date of fit:     Fri Feb 22 20:48:34 2019 
+## Date of summary: Fri Feb 22 20:48:34 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 611 model solutions performed in 1.515 s
+## Fitted with method Port using 611 model solutions performed in 1.604 s
 ## 
 ## Weighting: none
 ## 
@@ -297,15 +297,15 @@
 
summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:25 2019 
-## Date of summary: Fri Feb 22 09:51:25 2019 
+## Date of fit:     Fri Feb 22 20:48:35 2019 
+## Date of summary: Fri Feb 22 20:48:35 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 81 model solutions performed in 0.198 s
+## Fitted with method Port using 81 model solutions performed in 0.216 s
 ## 
 ## Weighting: none
 ## 
@@ -368,8 +368,8 @@
 
summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:26 2019 
-## Date of summary: Fri Feb 22 09:51:26 2019 
+## Date of fit:     Fri Feb 22 20:48:36 2019 
+## Date of summary: Fri Feb 22 20:48:36 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -378,7 +378,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 0.847 s
+## Fitted with method Port using 336 model solutions performed in 0.864 s
 ## 
 ## Weighting: none
 ## 
@@ -460,8 +460,8 @@
 
summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:27 2019 
-## Date of summary: Fri Feb 22 09:51:27 2019 
+## Date of fit:     Fri Feb 22 20:48:37 2019 
+## Date of summary: Fri Feb 22 20:48:38 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -470,7 +470,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 137 model solutions performed in 0.347 s
+## Fitted with method Port using 137 model solutions performed in 0.362 s
 ## 
 ## Weighting: none
 ## 
@@ -561,15 +561,15 @@
 
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:27 2019 
-## Date of summary: Fri Feb 22 09:51:28 2019 
+## Date of fit:     Fri Feb 22 20:48:38 2019 
+## Date of summary: Fri Feb 22 20:48:38 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 46 model solutions performed in 0.112 s
+## Fitted with method Port using 46 model solutions performed in 0.123 s
 ## 
 ## Weighting: none
 ## 
@@ -621,15 +621,15 @@
 
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Fri Feb 22 09:51:28 2019 
-## Date of summary: Fri Feb 22 09:51:28 2019 
+## Date of fit:     Fri Feb 22 20:48:38 2019 
+## Date of summary: Fri Feb 22 20:48:38 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.165 s
+## Fitted with method Port using 66 model solutions performed in 0.184 s
 ## 
 ## Weighting: none
 ## 
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html
index e9f8fa99..fbf2de33 100644
--- a/docs/articles/web_only/compiled_models.html
+++ b/docs/articles/web_only/compiled_models.html
@@ -126,14 +126,14 @@
 }
## Lade nötiges Paket: rbenchmark
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   2.336    1.000     2.335        0
-## 1 deSolve, not compiled            3  17.610    7.539    17.602        0
-## 2      Eigenvalue based            3   2.899    1.241     2.897        0
+## 3     deSolve, compiled            3   2.484    1.000     2.483        0
+## 1 deSolve, not compiled            3  17.963    7.231    17.951        0
+## 2      Eigenvalue based            3   3.146    1.267     3.144        0
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
 ## 2          0         0
-

We see that using the compiled model is by a factor of around 8 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.

+

We see that using the compiled model is by a factor of around 7 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.

@@ -157,8 +157,8 @@ }

## Successfully compiled differential equation model from auto-generated C code.
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   4.122    1.000     4.119        0
-## 1 deSolve, not compiled            3  37.359    9.063    37.343        0
+## 2     deSolve, compiled            3   4.232    1.000     4.226    0.004
+## 1 deSolve, not compiled            3  37.946    8.966    37.924    0.000
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
diff --git a/docs/news/index.html b/docs/news/index.html index 2e62819c..cd82d187 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -119,9 +119,9 @@ -
+

-mkin 0.9.48.1 (2019-02-21) Unreleased +mkin 0.9.48.1 (2019-02-22) Unreleased

  • Add the function ‘logLik.mkinfit’ which makes it possible to calculate an AIC for mkinfit objects

  • @@ -133,6 +133,7 @@
  • ‘tests/testthat/test_irls.R’: Test if the components of the error model used to generate the data can be reproduced with moderate accuracy

  • Add the function ‘CAKE_export’ to facilitate cross-checking of results

  • Implement the logistic model (only tested for parent fits)

  • +
  • ‘nafta’: Add evaluations according to the NAFTA guidance

@@ -676,7 +677,7 @@

Contents

#> Successfully compiled differential equation model from auto-generated C code.
fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"), quiet = TRUE) summary(fit.1, data = FALSE)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:49:48 2019 -#> Date of summary: Fri Feb 22 09:49:48 2019 +#> Date of fit: Fri Feb 22 20:46:54 2019 +#> Date of summary: Fri Feb 22 20:46:54 2019 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -171,7 +171,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 574 model solutions performed in 3.837 s +#> Fitted with method Port using 574 model solutions performed in 4.461 s #> #> Weighting: none #> @@ -249,8 +249,8 @@ fixed_parms = "k_phenol_sink", quiet = TRUE) summary(fit.2, data = FALSE)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:49:50 2019 -#> Date of summary: Fri Feb 22 09:49:50 2019 +#> Date of fit: Fri Feb 22 20:46:56 2019 +#> Date of summary: Fri Feb 22 20:46:56 2019 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -260,7 +260,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 246 model solutions performed in 1.611 s +#> Fitted with method Port using 246 model solutions performed in 1.709 s #> #> Weighting: none #> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index addb23e5..dfdddb25 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -438,15 +438,15 @@ fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:49:53 2019 -#> Date of summary: Fri Feb 22 09:49:53 2019 +#> Date of fit: Fri Feb 22 20:46:59 2019 +#> Date of summary: Fri Feb 22 20:46:59 2019 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 64 model solutions performed in 0.159 s +#> Fitted with method Port using 64 model solutions performed in 0.185 s #> #> Weighting: none #> @@ -515,7 +515,7 @@ m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults print(system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE)))
#> User System verstrichen -#> 1.015 0.000 1.016
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.071 0.000 1.072
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -590,7 +590,7 @@ #> Model cost at call 146 : 371.2134 #> Optimisation by method Port successfully terminated. #> User System verstrichen -#> 0.821 0.000 0.822
coef(fit.deSolve)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.852 0.000 0.852
coef(fit.deSolve)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
endpoints(fit.deSolve)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -628,8 +628,8 @@ m1 = mkinsub("SFO"), use_of_ff = "max")
#> Successfully compiled differential equation model from auto-generated C code.
f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE) summary(f.noweight)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:05 2019 -#> Date of summary: Fri Feb 22 09:50:05 2019 +#> Date of fit: Fri Feb 22 20:47:11 2019 +#> Date of summary: Fri Feb 22 20:47:11 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -637,7 +637,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 186 model solutions performed in 0.853 s +#> Fitted with method Port using 186 model solutions performed in 0.864 s #> #> Weighting: none #> @@ -745,8 +745,8 @@ #> 120 m1 33.31 28.78984 4.520e+00
f.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs", quiet = TRUE) summary(f.irls)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:07 2019 -#> Date of summary: Fri Feb 22 09:50:07 2019 +#> Date of fit: Fri Feb 22 20:47:14 2019 +#> Date of summary: Fri Feb 22 20:47:14 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -754,7 +754,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 551 model solutions performed in 2.535 s +#> Fitted with method Port using 551 model solutions performed in 2.584 s #> #> Weighting: none #> @@ -867,8 +867,8 @@ #> 120 m1 33.31 28.80898 4.501e+00 2.722
f.w.mean <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, weight = "mean", quiet = TRUE) summary(f.w.mean)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:08 2019 -#> Date of summary: Fri Feb 22 09:50:08 2019 +#> Date of fit: Fri Feb 22 20:47:15 2019 +#> Date of summary: Fri Feb 22 20:47:15 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -876,7 +876,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.717 s +#> Fitted with method Port using 155 model solutions performed in 0.716 s #> #> Weighting: mean #> @@ -985,8 +985,8 @@ quiet = TRUE) summary(f.w.value)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:09 2019 -#> Date of summary: Fri Feb 22 09:50:09 2019 +#> Date of fit: Fri Feb 22 20:47:16 2019 +#> Date of summary: Fri Feb 22 20:47:16 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -994,7 +994,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.796 s +#> Fitted with method Port using 174 model solutions performed in 0.83 s #> #> Weighting: manual #> @@ -1105,8 +1105,8 @@ f.w.man <- mkinfit(SFO_SFO.ff, dw, err = "err.man", quiet = TRUE) summary(f.w.man)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:11 2019 -#> Date of summary: Fri Feb 22 09:50:11 2019 +#> Date of fit: Fri Feb 22 20:47:17 2019 +#> Date of summary: Fri Feb 22 20:47:17 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1114,7 +1114,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 270 model solutions performed in 1.325 s +#> Fitted with method Port using 270 model solutions performed in 1.286 s #> #> Weighting: manual #> @@ -1223,8 +1223,8 @@ reweight.method = "obs") summary(f.w.man.irls)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:50:14 2019 -#> Date of summary: Fri Feb 22 09:50:14 2019 +#> Date of fit: Fri Feb 22 20:47:21 2019 +#> Date of summary: Fri Feb 22 20:47:21 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1232,7 +1232,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 692 model solutions performed in 3.303 s +#> Fitted with method Port using 692 model solutions performed in 3.38 s #> #> Weighting: manual #> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index b2f290d1..64fba5e5 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -231,7 +231,7 @@ For the definition of model types and their parameters, the equations given SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), verbose = TRUE)
#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file4d9c2c394c1.c 2> file4d9c2c394c1.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file622753352edd.c 2> file622753352edd.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 6f789fa4..2b4c33aa 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -325,17 +325,17 @@ c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "eigen")[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> User System verstrichen -#> 0.003 0.000 0.003
system.time( +#> 0.004 0.000 0.003
system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve")[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> User System verstrichen -#> 0.001 0.000 0.002
system.time( +#> 0.002 0.000 0.002
system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve", use_compiled = FALSE)[201,]))
#> time parent m1 #> 201 20 4.978707 27.46227
#> User System verstrichen -#> 0.042 0.000 0.042
+#> 0.039 0.000 0.040
# Predict from a fitted model f <- mkinfit(SFO_SFO, FOCUS_2006_C)
#> Model cost at call 1 : 552.5739 #> Model cost at call 3 : 552.5739 diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 73a25ef2..71ec89e8 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -191,8 +191,8 @@ time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) time_default
#> User System verstrichen -#> 0.040 0.047 7.314
time_1
#> User System verstrichen -#> 22.751 0.000 22.766
+#> 0.052 0.044 7.383
time_1
#> User System verstrichen +#> 23.652 0.004 23.672
endpoints(fits.0[["SFO_lin", 2]])
#> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340480 0.2659520 0.7505686 0.2494314 diff --git a/docs/reference/nafta-1.png b/docs/reference/nafta-1.png new file mode 100644 index 00000000..c4f9f048 Binary files /dev/null and b/docs/reference/nafta-1.png differ diff --git a/docs/reference/nafta.html b/docs/reference/nafta.html new file mode 100644 index 00000000..c74c3939 --- /dev/null +++ b/docs/reference/nafta.html @@ -0,0 +1,239 @@ + + + + + + + + +Evaluate parent kinetics using the NAFTA guidance — nafta • mkin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

The function fits the SFO, IORE and DFOP models using + mmkin and returns an object of class + nafta that has methods for printing and plotting.

+ +
+ +
nafta(ds, title = NA, quiet = FALSE)
+ +

Arguments

+ + + + + + + + + + + + + + +
ds

A dataframe that must contain one variable called "time" with the time + values specified by the time argument, one column called "name" with + the grouping of the observed values, and finally one column of observed + values called "value".

title

Optional title of the dataset

quiet

Should the evaluation text be shown?

+ +

Value

+ +

An list of class nafta. The list element named "mmkin" is the + mmkin object containing the fits of the three models. + The list element named "title" contains the title of the dataset used. + The list element "data" contains the dataset used in the fits.

+ +

Source

+ +

NAFTA (2011) Guidance for evaluating and calculating degradation kinetics + in environmental media. NAFTA Technical Working Group on Pesticides + https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation + accessed 2019-02-22

+

US EPA (2015) Standard Operating Procedure for Using the NAFTA Guidance to + Calculate Representative Half-life Values and Characterizing Pesticide + Degradation + https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance

+ + +

Examples

+
nafta_evaluation <- nafta(MRID_555555)
#> 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 reprentative half-life obtained from the DFOP model may be used
print(nafta_evaluation)
#> Parameters: +#> $SFO +#> Estimate Pr(>t) Lower Upper +#> parent_0 83.755751519 8.076390e-15 76.928220975 90.583282063 +#> k_parent_sink 0.001703321 7.452357e-05 0.001108568 0.002617164 +#> +#> $IORE +#> Estimate Pr(>t) Lower Upper +#> parent_0 9.685291e+01 NA 8.752855e+01 1.061773e+02 +#> k__iore_parent_sink 8.403374e-14 NA 1.092054e-19 6.466412e-08 +#> N_parent 6.684458e+00 NA 3.538511e+00 9.830405e+00 +#> +#> $DFOP +#> Estimate Pr(>t) Lower Upper +#> parent_0 9.755655e+01 4.439930e-13 8.884447e+01 1.062686e+02 +#> k1 4.240633e-02 3.554769e-02 1.414189e-02 1.271610e-01 +#> k2 8.237928e-04 2.060933e-02 3.172784e-04 2.138925e-03 +#> g 2.881037e-01 1.313715e-04 1.783967e-01 4.299694e-01 +#> +#> +#> DTx values: +#> DT50 DT90 DT50_rep +#> SFO 407 1352 407 +#> IORE 541 5192066 1562968 +#> DFOP 429 2383 841 +#> +#> Representative half-life: +#> [1] 841.4096
plot(nafta_evaluation)
+
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/plot.nafta.html b/docs/reference/plot.nafta.html new file mode 100644 index 00000000..ccc98b23 --- /dev/null +++ b/docs/reference/plot.nafta.html @@ -0,0 +1,190 @@ + + + + + + + + +Plot the results of the three models used in the NAFTA scheme — plot.nafta • mkin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

Calls plot.mmkin.

+ +
+ +
# S3 method for nafta
+plot(x, legend = FALSE, main = "auto", …)
+ +

Arguments

+ + + + + + + + + + + + + + + + + + +
x

An object of class nafta.

legend

Should a legend be added?

main

Possibility to override the main title of the plot.

Further arguments passed to plot.mmkin.

+ +

Value

+ +

The function is called for its side effect.

+ + +
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/print.nafta.html b/docs/reference/print.nafta.html new file mode 100644 index 00000000..dc9373f7 --- /dev/null +++ b/docs/reference/print.nafta.html @@ -0,0 +1,178 @@ + + + + + + + + +Print nafta objects — print.nafta • mkin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

Print nafta objects.

+ +
+ +
# S3 method for nafta
+print(x, quiet = TRUE, ...)
+ +

Arguments

+ + + + + + + + + + + + + + +
x

An nafta object.

quiet

Should the evaluation text be shown?

Not used.

+ + +
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 1543c328..39ef962c 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -208,15 +208,15 @@

Examples

summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:51:06 2019 -#> Date of summary: Fri Feb 22 09:51:06 2019 +#> Date of fit: Fri Feb 22 20:48:16 2019 +#> Date of summary: Fri Feb 22 20:48:16 2019 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 35 model solutions performed in 0.086 s +#> Fitted with method Port using 35 model solutions performed in 0.088 s #> #> Weighting: none #> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index 65a6b4ee..9d18fbb2 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -202,8 +202,8 @@ The transformation of sets of formation fractions is fragile, as it supposes fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) summary(fit, data=FALSE) # See transformed and backtransformed parameters
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:51:14 2019 -#> Date of summary: Fri Feb 22 09:51:14 2019 +#> Date of fit: Fri Feb 22 20:48:24 2019 +#> Date of summary: Fri Feb 22 20:48:24 2019 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -211,7 +211,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 153 model solutions performed in 0.775 s +#> Fitted with method Port using 153 model solutions performed in 0.717 s #> #> Weighting: none #> @@ -278,8 +278,8 @@ The transformation of sets of formation fractions is fragile, as it supposes
fit.2 <- mkinfit(SFO_SFO, FOCUS_2006_D, transform_rates = FALSE, quiet = TRUE) summary(fit.2, data=FALSE)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:51:16 2019 -#> Date of summary: Fri Feb 22 09:51:16 2019 +#> Date of fit: Fri Feb 22 20:48:26 2019 +#> Date of summary: Fri Feb 22 20:48:26 2019 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -287,7 +287,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 350 model solutions performed in 1.584 s +#> Fitted with method Port using 350 model solutions performed in 1.661 s #> #> Weighting: none #> @@ -366,8 +366,8 @@ The transformation of sets of formation fractions is fragile, as it supposes fit.ff <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE) summary(fit.ff, data = FALSE)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:51:17 2019 -#> Date of summary: Fri Feb 22 09:51:17 2019 +#> Date of fit: Fri Feb 22 20:48:27 2019 +#> Date of summary: Fri Feb 22 20:48:27 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -375,7 +375,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 186 model solutions performed in 0.858 s +#> Fitted with method Port using 186 model solutions performed in 0.871 s #> #> Weighting: none #> @@ -450,8 +450,8 @@ The transformation of sets of formation fractions is fragile, as it supposes fit.ff.2 <- mkinfit(SFO_SFO.ff.2, FOCUS_2006_D, quiet = TRUE) summary(fit.ff.2, data = FALSE)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Fri Feb 22 09:51:18 2019 -#> Date of summary: Fri Feb 22 09:51:18 2019 +#> Date of fit: Fri Feb 22 20:48:28 2019 +#> Date of summary: Fri Feb 22 20:48:28 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -459,7 +459,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 104 model solutions performed in 0.47 s +#> Fitted with method Port using 104 model solutions performed in 0.484 s #> #> Weighting: none #> -- cgit v1.2.1