From dd30f0d0ff1d8d0cc46aaef6e0917c51fe798f52 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 19 Jan 2017 10:36:19 +0100 Subject: Move mkin::twa to pfm::max_twa.mkinfit - Add max_twa.mkinfit() recently introduced to mkin as mkin::twa() but never released with it - Add a test to check max_twa.one_box() against analytical solutions in max_twa.mkinfit(). - Clean up R CMD check - Update docs --- docs/reference/max_twa.html | 45 ++++++++++++++++++++++++++++++++++++-- docs/reference/one_box-4.png | Bin 5743 -> 5587 bytes docs/reference/one_box-8.png | Bin 9901 -> 9860 bytes docs/reference/one_box.html | 12 ++++++---- docs/reference/plot.one_box-8.png | Bin 13603 -> 13490 bytes docs/reference/sawtooth-6.png | Bin 13603 -> 13490 bytes docs/reference/sawtooth.html | 4 ++-- 7 files changed, 53 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html index 4bb1be9..f78da58 100644 --- a/docs/reference/max_twa.html +++ b/docs/reference/max_twa.html @@ -70,7 +70,11 @@ -

The maximum time weighted average concentration for a moving window

+

If you generate your time series using sawtooth, +you need to make sure that the length of the time series allows +for finding the maximum. It is therefore recommended to check this using +plot.one_box using the window size for the argument +max_twa.

max_twa(x, window = 21)
@@ -83,19 +87,56 @@
The size of the moving window
+

Details

+ +

The method working directly on fitted mkinfit objects uses the +equations given in the PEC soil section of the FOCUS guidance and is restricted +SFO, FOMC and DFOP models and to the parent compound

+ +

References

+ +

FOCUS (2006) “Guidance Document on Estimating Persistence and + Degradation Kinetics from Environmental Fate Studies on Pesticides in EU + Registration” Report of the FOCUS Work Group on Degradation Kinetics, + EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, + http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

+

See also

twa

+

Examples

+
pred <- sawtooth(one_box(10), + applications = data.frame(time = c(0, 7), amount = c(1, 1))) +max_twa(pred)
#> $max +#> parent +#> 0.9537545 +#> +#> $window_start +#> parent +#> 0 +#> +#> $window_end +#> parent +#> 21 +#>
pred_FOMC <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) +max_twa(pred_FOMC)
#> 21 +#> 18.22124
diff --git a/docs/reference/one_box-4.png b/docs/reference/one_box-4.png index 10ebb35..3c6dadb 100644 Binary files a/docs/reference/one_box-4.png and b/docs/reference/one_box-4.png differ diff --git a/docs/reference/one_box-8.png b/docs/reference/one_box-8.png index 31e2f4b..897737e 100644 Binary files a/docs/reference/one_box-8.png and b/docs/reference/one_box-8.png differ diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html index 698f887..cb49c02 100644 --- a/docs/reference/one_box.html +++ b/docs/reference/one_box.html @@ -74,22 +74,26 @@ This does not create objects of type ts.

-
one_box(x, ..., t_end = 100, res = 0.01)
+    
one_box(x, ini, ..., t_end = 100, res = 0.01)
 
 # S3 method for numeric
-one_box(x, ..., t_end = 100, res = 0.01)
+one_box(x, ini = 1, ..., t_end = 100, res = 0.01)
 
 # S3 method for character
-one_box(x, parms, ..., t_end = 100, res = 0.01)
+one_box(x, ini = 1, parms, ..., t_end = 100,
+  res = 0.01)
 
 # S3 method for mkinfit
-one_box(x, ..., t_end = 100, res = 0.01)
+one_box(x, ini = c("model", 1), ..., t_end = 100, + res = 0.01)

Arguments

x
When numeric, this is the half-life to be used for an exponential decline. If x is an mkinfit object, the decline is calculated from this object
+
ini
+
The initial amount for each compound
...
Further arguments passed to methods
t_end
diff --git a/docs/reference/plot.one_box-8.png b/docs/reference/plot.one_box-8.png index 161ecb4..f534444 100644 Binary files a/docs/reference/plot.one_box-8.png and b/docs/reference/plot.one_box-8.png differ diff --git a/docs/reference/sawtooth-6.png b/docs/reference/sawtooth-6.png index 161ecb4..f534444 100644 Binary files a/docs/reference/sawtooth-6.png and b/docs/reference/sawtooth-6.png differ diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html index cf33630..216f64a 100644 --- a/docs/reference/sawtooth.html +++ b/docs/reference/sawtooth.html @@ -102,8 +102,8 @@ the corresponding amounts applied in the second column. pred_2_saw <- sawtooth(pred_2, 2, 7) plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
max_twa(pred_2_saw)
#> $max -#> parent m1 -#> 0.6627707 0.8542785 +#> parent m1 +#> 66.01096 85.08484 #> #> $window_start #> parent m1 -- cgit v1.2.1