From 8bdb4cd437a9d4663e542f95869e8692aa38dadb Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 7 May 2020 08:59:29 +0200 Subject: Static documentation rebuilt by pkgdown --- docs/reference/DFOP.solution.html | 69 ++++++----- docs/reference/FOMC.solution.html | 66 ++++++----- docs/reference/HS.solution.html | 86 ++++++-------- docs/reference/IORE.solution.html | 80 ++++++------- docs/reference/SFO.solution.html | 71 +++++++----- docs/reference/SFORB.solution.html | 75 ++++++------ docs/reference/index.html | 101 +++++++++++----- docs/reference/logistic.solution-1.png | Bin 63262 -> 80598 bytes docs/reference/logistic.solution-2.png | Bin 29336 -> 80598 bytes docs/reference/logistic.solution.html | 125 ++++++++++++-------- docs/reference/mkinds.html | 57 ++++----- docs/reference/mkinfit.html | 171 ++++++++------------------- docs/reference/mkinmod.html | 57 +++++---- docs/reference/mkinpredict.html | 205 ++++++++++++++------------------- 14 files changed, 582 insertions(+), 581 deletions(-) (limited to 'docs/reference') diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index eef4f902..46e0cc91 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -38,7 +42,6 @@ - @@ -56,7 +59,7 @@ two exponential decline functions." /> - +
@@ -114,7 +117,12 @@ two exponential decline functions." />
@@ -129,7 +137,7 @@ two exponential decline functions." />
@@ -138,7 +146,7 @@ two exponential decline functions." /> two exponential decline functions.

-
DFOP.solution(t, parent.0, k1, k2, g)
+
DFOP.solution(t, parent_0, k1, k2, g)

Arguments

@@ -148,7 +156,7 @@ two exponential decline functions.

- + @@ -175,22 +183,31 @@ kinetic constant.

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 +FOCUS (2014) “Generic guidance for Estimating Persistence + and Degradation Kinetics from Environmental Fate Studies on Pesticides in + EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, + Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

+

See also

+ +

Other parent solutions: +FOMC.solution(), +HS.solution(), +IORE.solution(), +SFO.solution(), +SFORB.solution(), +logistic.solution()

Examples

- plot(function(x) DFOP.solution(x, 100, 5, 0.5, 0.3), 0, 4, ylim = c(0,100))
+ plot(function(x) DFOP.solution(x, 100, 5, 0.5, 0.3), 0, 4, ylim = c(0,100))
- @@ -201,7 +218,7 @@ kinetic constant.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index f44ad713..8e2b154e 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -38,7 +42,6 @@ - @@ -56,7 +59,7 @@ a decreasing rate constant." /> - +
@@ -114,7 +117,12 @@ a decreasing rate constant." />
@@ -129,7 +137,7 @@ a decreasing rate constant." />
@@ -138,7 +146,7 @@ a decreasing rate constant." /> a decreasing rate constant.

-
FOMC.solution(t, parent.0, alpha, beta)
+
FOMC.solution(t, parent_0, alpha, beta)

Arguments

Time.

parent.0parent_0

Starting value for the response variable at time zero.

@@ -148,7 +156,7 @@ a decreasing rate constant.

- + @@ -185,23 +193,25 @@ in the original equation.

Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: A new model based on spatial variability. Environmental Science and Technology 24, 1032-1038

+

See also

+ +

Other parent solutions: +DFOP.solution(), +HS.solution(), +IORE.solution(), +SFO.solution(), +SFORB.solution(), +logistic.solution()

Examples

- plot(function(x) FOMC.solution(x, 100, 10, 2), 0, 2, ylim = c(0, 100))
+ plot(function(x) FOMC.solution(x, 100, 10, 2), 0, 2, ylim = c(0, 100))
- @@ -212,7 +222,7 @@ in the original equation.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index 82b9324c..ad33d948 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -38,7 +42,6 @@ - @@ -56,7 +59,7 @@ between them." /> - +
@@ -114,7 +117,12 @@ between them." />
@@ -129,7 +137,7 @@ between them." />
@@ -138,27 +146,11 @@ between them." /> between them.

-
HS.solution(t, parent.0, k1, k2, tb)
+
HS.solution(t, parent_0, k1, k2, tb)

Arguments

Time.

parent.0parent_0

Starting value for the response variable at time zero.

- - - - - - - - - - - - - - - -
t

Time.

parent.0

Starting value for the response variable at time zero.

k1

First kinetic constant.

k2

Second kinetic constant.

tb

Break point. Before this time, exponential decline according to @@ -167,31 +159,25 @@ according to k2.

-

Value

- -

The value of the response variable at time t.

-

References

+

See also

-

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

+

Other parent solutions: +DFOP.solution(), +FOMC.solution(), +IORE.solution(), +SFO.solution(), +SFORB.solution(), +logistic.solution()

Examples

- plot(function(x) HS.solution(x, 100, 2, 0.3, 0.5), 0, 2, ylim=c(0,100))
+ plot(function(x) HS.solution(x, 100, 2, 0.3, 0.5), 0, 2, ylim=c(0,100))
- @@ -202,7 +188,7 @@ according to k2.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index 6af44ab8..677d4b43 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -38,7 +42,6 @@ - @@ -56,7 +59,7 @@ a concentration dependent rate constant." /> - +
@@ -114,7 +117,12 @@ a concentration dependent rate constant." />
@@ -129,7 +137,7 @@ a concentration dependent rate constant." />
@@ -138,7 +146,7 @@ a concentration dependent rate constant." /> a concentration dependent rate constant.

-
IORE.solution(t, parent.0, k__iore, N)
+
IORE.solution(t, parent_0, k__iore, N)

Arguments

@@ -148,7 +156,7 @@ a concentration dependent rate constant.

- + @@ -175,37 +183,31 @@ units used.

NAFTA Technical Working Group on Pesticides (not dated) Guidance for Evaluating and Calculating Degradation Kinetics in Environmental Media

+

See also

+ +

Other parent solutions: +DFOP.solution(), +FOMC.solution(), +HS.solution(), +SFO.solution(), +SFORB.solution(), +logistic.solution()

Examples

- plot(function(x) IORE.solution(x, 100, 0.2, 1.3), 0, 2, ylim = c(0, 100))
# \dontrun{ - fit.fomc <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) - fit.iore <- mkinfit("IORE", FOCUS_2006_C, quiet = TRUE) - fit.iore.deS <- mkinfit("IORE", FOCUS_2006_C, solution_type = "deSolve", quiet = TRUE) + plot(function(x) IORE.solution(x, 100, 0.2, 1.3), 0, 2, ylim = c(0, 100))
# \dontrun{ + fit.fomc <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE)
#> Error in (function (t, parent_0, alpha, beta) { parent = parent_0/(t/beta + 1)^alpha})(t = c(0, 1, 1.2020202020202, 2.4040404040404, 3, 3.60606060606061, 4.80808080808081, 6.01010101010101, 7, 7.21212121212121, 8.41414141414141, 9.61616161616162, 10.8181818181818, 12.020202020202, 13.2222222222222, 14, 14.4242424242424, 15.6262626262626, 16.8282828282828, 18.030303030303, 19.2323232323232, 20.4343434343434, 21.6363636363636, 22.8383838383838, 24.040404040404, 25.2424242424242, 26.4444444444444, 27.6464646464646, 28, 28.8484848484848, 30.050505050505, 31.2525252525253, 32.4545454545455, 33.6565656565657, 34.8585858585859, 36.0606060606061, 37.2626262626263, 38.4646464646465, 39.6666666666667, 40.8686868686869, 42.0707070707071, 43.2727272727273, 44.4747474747475, 45.6767676767677, 46.8787878787879, 48.0808080808081, 49.2828282828283, 50.4848484848485, 51.6868686868687, 52.8888888888889, 54.0909090909091, 55.2929292929293, 56.4949494949495, 57.6969696969697, 58.8989898989899, 60.1010101010101, 61.3030303030303, 62.5050505050505, 63, 63.7070707070707, 64.9090909090909, 66.1111111111111, 67.3131313131313, 68.5151515151515, 69.7171717171717, 70.9191919191919, 72.1212121212121, 73.3232323232323, 74.5252525252525, 75.7272727272727, 76.9292929292929, 78.1313131313131, 79.3333333333333, 80.5353535353535, 81.7373737373737, 82.9393939393939, 84.1414141414141, 85.3434343434343, 86.5454545454545, 87.7474747474747, 88.9494949494949, 90.1515151515152, 91, 91.3535353535353, 92.5555555555556, 93.7575757575758, 94.959595959596, 96.1616161616162, 97.3636363636364, 98.5656565656566, 99.7676767676768, 100.969696969697, 102.171717171717, 103.373737373737, 104.575757575758, 105.777777777778, 106.979797979798, 108.181818181818, 109.383838383838, 110.585858585859, 111.787878787879, 112.989898989899, 114.191919191919, 115.393939393939, 116.59595959596, 117.79797979798, 119), parent.0 = c(parent = 85.1), alpha = 1, beta = 10): unbenutztes Argument (parent.0 = 85.1)
#> Timing stopped at: 0.002 0 0.002
fit.iore <- mkinfit("IORE", FOCUS_2006_C, quiet = TRUE)
#> Error in (function (t, parent_0, k__iore, N) { parent = (parent_0^(1 - N) - (1 - N) * k__iore * t)^(1/(1 - N))})(t = c(0, 1, 1.2020202020202, 2.4040404040404, 3, 3.60606060606061, 4.80808080808081, 6.01010101010101, 7, 7.21212121212121, 8.41414141414141, 9.61616161616162, 10.8181818181818, 12.020202020202, 13.2222222222222, 14, 14.4242424242424, 15.6262626262626, 16.8282828282828, 18.030303030303, 19.2323232323232, 20.4343434343434, 21.6363636363636, 22.8383838383838, 24.040404040404, 25.2424242424242, 26.4444444444444, 27.6464646464646, 28, 28.8484848484848, 30.050505050505, 31.2525252525253, 32.4545454545455, 33.6565656565657, 34.8585858585859, 36.0606060606061, 37.2626262626263, 38.4646464646465, 39.6666666666667, 40.8686868686869, 42.0707070707071, 43.2727272727273, 44.4747474747475, 45.6767676767677, 46.8787878787879, 48.0808080808081, 49.2828282828283, 50.4848484848485, 51.6868686868687, 52.8888888888889, 54.0909090909091, 55.2929292929293, 56.4949494949495, 57.6969696969697, 58.8989898989899, 60.1010101010101, 61.3030303030303, 62.5050505050505, 63, 63.7070707070707, 64.9090909090909, 66.1111111111111, 67.3131313131313, 68.5151515151515, 69.7171717171717, 70.9191919191919, 72.1212121212121, 73.3232323232323, 74.5252525252525, 75.7272727272727, 76.9292929292929, 78.1313131313131, 79.3333333333333, 80.5353535353535, 81.7373737373737, 82.9393939393939, 84.1414141414141, 85.3434343434343, 86.5454545454545, 87.7474747474747, 88.9494949494949, 90.1515151515152, 91, 91.3535353535353, 92.5555555555556, 93.7575757575758, 94.959595959596, 96.1616161616162, 97.3636363636364, 98.5656565656566, 99.7676767676768, 100.969696969697, 102.171717171717, 103.373737373737, 104.575757575758, 105.777777777778, 106.979797979798, 108.181818181818, 109.383838383838, 110.585858585859, 111.787878787879, 112.989898989899, 114.191919191919, 115.393939393939, 116.59595959596, 117.79797979798, 119), parent.0 = c(parent = 85.1), k__iore = 0.1, N = 1.1): unbenutztes Argument (parent.0 = 85.1)
#> Timing stopped at: 0 0 0.001
fit.iore.deS <- mkinfit("IORE", FOCUS_2006_C, solution_type = "deSolve", quiet = TRUE) print(data.frame(fit.fomc$par, fit.iore$par, fit.iore.deS$par, - row.names = paste("model par", 1:4)))
#> fit.fomc.par fit.iore.par fit.iore.deS.par -#> model par 1 85.87489063 85.874890 85.874890 -#> model par 2 0.05192238 -4.826631 -4.826631 -#> model par 3 0.65096665 1.949403 1.949403 -#> model par 4 1.85744396 1.857444 1.857444
print(rbind(fomc = endpoints(fit.fomc)$distimes, iore = endpoints(fit.iore)$distimes, - iore.deS = endpoints(fit.iore)$distimes))
#> DT50 DT90 DT50back -#> fomc 1.785233 15.1479 4.559973 -#> iore 1.785233 15.1479 4.559973 -#> iore.deS 1.785233 15.1479 4.559973
# } + row.names = paste("model par", 1:4)))
#> Error in data.frame(fit.fomc$par, fit.iore$par, fit.iore.deS$par, row.names = paste("model par", 1:4)): Objekt 'fit.fomc' nicht gefunden
print(rbind(fomc = endpoints(fit.fomc)$distimes, iore = endpoints(fit.iore)$distimes, + iore.deS = endpoints(fit.iore)$distimes))
#> Error in endpoints(fit.fomc): Objekt 'fit.fomc' nicht gefunden
# }
- @@ -216,7 +218,7 @@ units used.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index 55fd61a4..93da04eb 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -37,7 +41,6 @@ - @@ -55,7 +58,7 @@ - +
@@ -113,7 +116,12 @@
@@ -128,7 +136,7 @@
@@ -136,7 +144,7 @@

Function describing exponential decline from a defined starting value.

-
SFO.solution(t, parent.0, k)
+
SFO.solution(t, parent_0, k)

Arguments

Time.

parent.0parent_0

Starting value for the response variable at time zero.

@@ -146,12 +154,12 @@ - + - +

Time.

parent.0parent_0

Starting value for the response variable at time zero.

k

Kinetic constant.

Kinetic rate constant.

@@ -164,22 +172,31 @@ 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 +FOCUS (2014) “Generic guidance for Estimating Persistence + and Degradation Kinetics from Environmental Fate Studies on Pesticides in + EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, + Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

+

See also

+ +

Other parent solutions: +DFOP.solution(), +FOMC.solution(), +HS.solution(), +IORE.solution(), +SFORB.solution(), +logistic.solution()

Examples

- plot(function(x) SFO.solution(x, 100, 3), 0, 2)
+ plot(function(x) SFO.solution(x, 100, 3), 0, 2)
- @@ -190,7 +207,7 @@
-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index fbf067af..c9f1b471 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -41,7 +45,6 @@ the kinetic model with first-order terms for a two-way transfer from a free to a bound fraction, and a first-order degradation term for the free fraction. The initial condition is a defined amount in the free fraction and no substance in the bound fraction." /> - @@ -59,7 +62,7 @@ and no substance in the bound fraction." /> - +
@@ -117,7 +120,12 @@ and no substance in the bound fraction." />
@@ -132,7 +140,7 @@ and no substance in the bound fraction." />
@@ -144,19 +152,11 @@ fraction. The initial condition is a defined amount in the free fraction and no substance in the bound fraction.

-
SFORB.solution(t, parent.0, k_12, k_21, k_1output)
+
SFORB.solution(t, parent_0, k_12, k_21, k_1output)

Arguments

- - - - - - - - @@ -176,28 +176,25 @@ fraction.

The value of the response variable, which is the sum of free and bound fractions at time t.

-

References

+

See also

-

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

+

Other parent solutions: +DFOP.solution(), +FOMC.solution(), +HS.solution(), +IORE.solution(), +SFO.solution(), +logistic.solution()

Examples

- plot(function(x) SFORB.solution(x, 100, 0.5, 2, 3), 0, 2)
+ plot(function(x) SFORB.solution(x, 100, 0.5, 2, 3), 0, 2)
- @@ -208,7 +205,7 @@ fraction.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/index.html b/docs/reference/index.html index e6a373d6..f77881fe 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -53,7 +57,7 @@ - +
@@ -143,6 +152,11 @@

Essential functionality

+ + + + +

Functions working with mkinfit objects

+ + + + +

Functions working with aggregated results

+ + + + +

Create and work with nonlinear mixed models

+ + + + +

+ + + + +

+ + + + +

+ + + + +

Parent only model solutions

+ + + + + @@ -571,6 +620,11 @@ kinetic models fitted with mkinfit

+ + + + +

Functions that have been superseded

+ + + + +
t

Time.

parent.0

Starting value for the response variable at time zero.

k_12

Kinetic constant describing transfer from free to bound.

@@ -176,6 +190,11 @@ more datasets

@@ -251,6 +270,11 @@ with mkinfit

@@ -278,6 +302,11 @@ of an mmkin object

@@ -310,6 +339,11 @@ of an mmkin object

@@ -402,6 +436,11 @@ of an mmkin object

@@ -422,6 +461,11 @@ of an mmkin object

@@ -521,6 +565,11 @@ kinetic models fitted with mkinfit

@@ -560,7 +609,7 @@ kinetic models fitted with mkinfit

-

logistic.solution()

+

logistic.solution() logistic.solution()

Logistic kinetics

@@ -585,6 +639,11 @@ kinetic models fitted with mkinfit

@@ -596,20 +655,10 @@ kinetic models fitted with mkinfit

- @@ -620,7 +669,7 @@ kinetic models fitted with mkinfit

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/logistic.solution-1.png b/docs/reference/logistic.solution-1.png index b9fb891c..fd11d0c0 100644 Binary files a/docs/reference/logistic.solution-1.png and b/docs/reference/logistic.solution-1.png differ diff --git a/docs/reference/logistic.solution-2.png b/docs/reference/logistic.solution-2.png index 78a31f93..fd11d0c0 100644 Binary files a/docs/reference/logistic.solution-2.png and b/docs/reference/logistic.solution-2.png differ diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index b2f24d45..3e87b90d 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -37,8 +41,9 @@ - @@ -56,7 +61,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> - +
@@ -114,7 +119,12 @@ an increasing rate constant, supposedly caused by microbial growth" />
@@ -129,16 +139,20 @@ an increasing rate constant, supposedly caused by microbial growth" />

Function describing exponential decline from a defined starting value, with +an increasing rate constant, supposedly caused by microbial growth

+

Function describing exponential decline from a defined starting value, with an increasing rate constant, supposedly caused by microbial growth

-
logistic.solution(t, parent.0, kmax, k0, r)
+
logistic.solution(t, parent_0, kmax, k0, r)
+
+logistic.solution(t, parent_0, kmax, k0, r)

Arguments

@@ -148,7 +162,7 @@ an increasing rate constant, supposedly caused by microbial growth

- + @@ -163,6 +177,10 @@ an increasing rate constant, supposedly caused by microbial growth

+ + + +

Time.

parent.0parent_0

Starting value for the response variable at time zero.

r

Growth rate of the increase in the rate constant.

parent.0

Starting value for the response variable at time zero.

Value

@@ -171,6 +189,8 @@ an increasing rate constant, supposedly caused by microbial growth

Note

The solution of the logistic model reduces to the + SFO.solution if k0 is equal to kmax.

+

The solution of the logistic model reduces to the SFO.solution if k0 is equal to kmax.

References

@@ -179,16 +199,25 @@ an increasing rate constant, supposedly caused by microbial growth

EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

+

See also

+ +

Other parent solutions: +DFOP.solution(), +FOMC.solution(), +HS.solution(), +IORE.solution(), +SFO.solution(), +SFORB.solution()

Examples

# Reproduce the plot on page 57 of FOCUS (2014) - plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.2), + plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.2), from = 0, to = 100, ylim = c(0, 100), - xlab = "Time", ylab = "Residue")
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.4), - from = 0, to = 100, add = TRUE, lty = 2, col = 2)
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.8), - from = 0, to = 100, add = TRUE, lty = 3, col = 3)
plot(function(x) logistic.solution(x, 100, 0.08, 0.001, 0.2), - from = 0, to = 100, add = TRUE, lty = 4, col = 4)
plot(function(x) logistic.solution(x, 100, 0.08, 0.08, 0.2), + xlab = "Time", ylab = "Residue")
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.4), + from = 0, to = 100, add = TRUE, lty = 2, col = 2)
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.8), + from = 0, to = 100, add = TRUE, lty = 3, col = 3)
plot(function(x) logistic.solution(x, 100, 0.08, 0.001, 0.2), + from = 0, to = 100, add = TRUE, lty = 4, col = 4)
plot(function(x) logistic.solution(x, 100, 0.08, 0.08, 0.2), from = 0, to = 100, add = TRUE, lty = 5, col = 5)
legend("topright", inset = 0.05, legend = paste0("k0 = ", c(0.0001, 0.0001, 0.0001, 0.001, 0.08), ", r = ", c(0.2, 0.4, 0.8, 0.2, 0.2)), @@ -205,32 +234,38 @@ an increasing rate constant, supposedly caused by microbial growth

sdfunc = function(x) sigma_twocomp(x, 0.5, 0.07), n = 1, reps = 2, digits = 5, LOD = 0.1, seed = 123456)[[1]] - m <- mkinfit("logistic", d_2_1, quiet = TRUE) - plot_sep(m)
summary(m)$bpar
#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 1.057896e+02 1.9023449649 55.610120 3.768361e-16 1.016451e+02 -#> kmax 6.398190e-02 0.0143201029 4.467978 3.841828e-04 3.929235e-02 -#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846685e-08 -#> r 2.263946e-01 0.1718110773 1.317695 1.061044e-01 4.335843e-02 -#> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 -#> Upper -#> parent_0 109.9341588 -#> kmax 0.1041853 -#> k0 0.4448750 -#> r 1.1821121 -#> sigma 7.3256566
endpoints(m)$distimes
#> DT50 DT90 DT50_k0 DT50_kmax -#> parent 36.86533 62.41511 4297.854 10.83349
+ m <- mkinfit("logistic", d_2_1, quiet = TRUE)
#> Error in (function (t, parent_0, kmax, k0, r) { parent = parent_0 * (kmax/(kmax - k0 + k0 * exp(r * t)))^(kmax/r)})(t = c(0, 1, 1.21212121212121, 2.42424242424242, 3, 3.63636363636364, 4.84848484848485, 6.06060606060606, 7, 7.27272727272727, 8.48484848484848, 9.6969696969697, 10.9090909090909, 12.1212121212121, 13.3333333333333, 14, 14.5454545454545, 15.7575757575758, 16.969696969697, 18.1818181818182, 19.3939393939394, 20.6060606060606, 21.8181818181818, 23.030303030303, 24.2424242424242, 25.4545454545455, 26.6666666666667, 27.8787878787879, 28, 29.0909090909091, 30.3030303030303, 31.5151515151515, 32.7272727272727, 33.9393939393939, 35.1515151515152, 36.3636363636364, 37.5757575757576, 38.7878787878788, 40, 41.2121212121212, 42.4242424242424, 43.6363636363636, 44.8484848484849, 46.0606060606061, 47.2727272727273, 48.4848484848485, 49.6969696969697, 50.9090909090909, 52.1212121212121, 53.3333333333333, 54.5454545454545, 55.7575757575758, 56.969696969697, 58.1818181818182, 59.3939393939394, 60, 60.6060606060606, 61.8181818181818, 63.030303030303, 64.2424242424242, 65.4545454545455, 66.6666666666667, 67.8787878787879, 69.0909090909091, 70.3030303030303, 71.5151515151515, 72.7272727272727, 73.9393939393939, 75.1515151515152, 76.3636363636364, 77.5757575757576, 78.7878787878788, 80, 81.2121212121212, 82.4242424242424, 83.6363636363636, 84.8484848484848, 86.0606060606061, 87.2727272727273, 88.4848484848485, 89.6969696969697, 90, 90.9090909090909, 92.1212121212121, 93.3333333333333, 94.5454545454545, 95.7575757575758, 96.969696969697, 98.1818181818182, 99.3939393939394, 100.606060606061, 101.818181818182, 103.030303030303, 104.242424242424, 105.454545454545, 106.666666666667, 107.878787878788, 109.090909090909, 110.30303030303, 111.515151515152, 112.727272727273, 113.939393939394, 115.151515151515, 116.363636363636, 117.575757575758, 118.787878787879, 120), parent.0 = c(parent = 101.95687), kmax = 0.1, k0 = 1e-04, r = 0.2): unbenutztes Argument (parent.0 = 101.95687)
#> Timing stopped at: 0.001 0 0.001
#> Error in identical(fit$err_mod, "const"): Objekt 'm' nicht gefunden
summary(m)$bpar
#> Error in summary(m): Objekt 'm' nicht gefunden
endpoints(m)$distimes
#> Error in endpoints(m): Objekt 'm' nicht gefunden
+ + # Reproduce the plot on page 57 of FOCUS (2014) + plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.2), + from = 0, to = 100, ylim = c(0, 100), + xlab = "Time", ylab = "Residue")
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.4), + from = 0, to = 100, add = TRUE, lty = 2, col = 2)
plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.8), + from = 0, to = 100, add = TRUE, lty = 3, col = 3)
plot(function(x) logistic.solution(x, 100, 0.08, 0.001, 0.2), + from = 0, to = 100, add = TRUE, lty = 4, col = 4)
plot(function(x) logistic.solution(x, 100, 0.08, 0.08, 0.2), + from = 0, to = 100, add = TRUE, lty = 5, col = 5)
legend("topright", inset = 0.05, + legend = paste0("k0 = ", c(0.0001, 0.0001, 0.0001, 0.001, 0.08), + ", r = ", c(0.2, 0.4, 0.8, 0.2, 0.2)), + lty = 1:5, col = 1:5)
+ # Fit with synthetic data + logistic <- mkinmod(parent = mkinsub("logistic")) + + sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) + parms_logistic <- c(kmax = 0.08, k0 = 0.0001, r = 0.2) + d_logistic <- mkinpredict(logistic, + parms_logistic, c(parent = 100), + sampling_times) + d_2_1 <- add_err(d_logistic, + sdfunc = function(x) sigma_twocomp(x, 0.5, 0.07), + n = 1, reps = 2, digits = 5, LOD = 0.1, seed = 123456)[[1]] + + m <- mkinfit("logistic", d_2_1, quiet = TRUE)
#> Error in (function (t, parent_0, kmax, k0, r) { parent = parent_0 * (kmax/(kmax - k0 + k0 * exp(r * t)))^(kmax/r)})(t = c(0, 1, 1.21212121212121, 2.42424242424242, 3, 3.63636363636364, 4.84848484848485, 6.06060606060606, 7, 7.27272727272727, 8.48484848484848, 9.6969696969697, 10.9090909090909, 12.1212121212121, 13.3333333333333, 14, 14.5454545454545, 15.7575757575758, 16.969696969697, 18.1818181818182, 19.3939393939394, 20.6060606060606, 21.8181818181818, 23.030303030303, 24.2424242424242, 25.4545454545455, 26.6666666666667, 27.8787878787879, 28, 29.0909090909091, 30.3030303030303, 31.5151515151515, 32.7272727272727, 33.9393939393939, 35.1515151515152, 36.3636363636364, 37.5757575757576, 38.7878787878788, 40, 41.2121212121212, 42.4242424242424, 43.6363636363636, 44.8484848484849, 46.0606060606061, 47.2727272727273, 48.4848484848485, 49.6969696969697, 50.9090909090909, 52.1212121212121, 53.3333333333333, 54.5454545454545, 55.7575757575758, 56.969696969697, 58.1818181818182, 59.3939393939394, 60, 60.6060606060606, 61.8181818181818, 63.030303030303, 64.2424242424242, 65.4545454545455, 66.6666666666667, 67.8787878787879, 69.0909090909091, 70.3030303030303, 71.5151515151515, 72.7272727272727, 73.9393939393939, 75.1515151515152, 76.3636363636364, 77.5757575757576, 78.7878787878788, 80, 81.2121212121212, 82.4242424242424, 83.6363636363636, 84.8484848484848, 86.0606060606061, 87.2727272727273, 88.4848484848485, 89.6969696969697, 90, 90.9090909090909, 92.1212121212121, 93.3333333333333, 94.5454545454545, 95.7575757575758, 96.969696969697, 98.1818181818182, 99.3939393939394, 100.606060606061, 101.818181818182, 103.030303030303, 104.242424242424, 105.454545454545, 106.666666666667, 107.878787878788, 109.090909090909, 110.30303030303, 111.515151515152, 112.727272727273, 113.939393939394, 115.151515151515, 116.363636363636, 117.575757575758, 118.787878787879, 120), parent.0 = c(parent = 101.95687), kmax = 0.1, k0 = 1e-04, r = 0.2): unbenutztes Argument (parent.0 = 101.95687)
#> Timing stopped at: 0 0 0
#> Error in identical(fit$err_mod, "const"): Objekt 'm' nicht gefunden
summary(m)$bpar
#> Error in summary(m): Objekt 'm' nicht gefunden
endpoints(m)$distimes
#> Error in endpoints(m): Objekt 'm' nicht gefunden
- @@ -241,7 +276,7 @@ an increasing rate constant, supposedly caused by microbial growth

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 4f5d9f67..778c5132 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -40,7 +44,6 @@ mkinfit does not take mkinds datasets as argument, but works with dataframes such as the on contained in the data field of mkinds objects. Some datasets provided by this package come as mkinds objects nevertheless." /> - @@ -58,7 +61,7 @@ provided by this package come as mkinds objects nevertheless." /> - +
@@ -131,7 +139,7 @@ provided by this package come as mkinds objects nevertheless." />
@@ -149,7 +157,7 @@ provided by this package come as mkinds objects nevertheless.

The S3 printing method print.mkinds

Public fields

-

+

title

A full title for the dataset

sampling_times

The sampling times

@@ -178,10 +186,10 @@ and value in order to be compatible with mkinfit


Method new()

Create a new mkinds object

Usage

-

mkinds$new(title = "", data, time_unit = NA, unit = NA)

+

mkinds$new(title = "", data, time_unit = NA, unit = NA)

Arguments

-

+

title

The dataset title

data

The data

@@ -194,10 +202,10 @@ and value in order to be compatible with mkinfit


Method clone()

The objects of this class are cloneable with this method.

Usage

-

mkinds$clone(deep = FALSE)

+

mkinds$clone(deep = FALSE)

Arguments

-

+

deep

Whether to make a deep clone.

@@ -213,15 +221,10 @@ and value in order to be compatible with mkinfit

#> With a maximum of 1 replicates
- @@ -232,7 +235,7 @@ and value in order to be compatible with mkinfit

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 09837505..62823c58 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -43,7 +47,6 @@ kinetic model is solved using the function mkinpredict. The parameters of the selected error model are fitted simultaneously with the degradation model parameters, as both of them are arguments of the likelihood function." /> - @@ -61,7 +64,7 @@ likelihood function." /> - +
@@ -134,7 +142,7 @@ likelihood function." />
@@ -168,8 +176,8 @@ likelihood function.

rtol = 1e-10, n.outtimes = 100, error_model = c("const", "obs", "tc"), - error_model_algorithm = c("auto", "d_3", "direct", "twostep", "threestep", "fourstep", - "IRLS", "OLS"), + error_model_algorithm = c("auto", "d_3", "direct", "twostep", "threestep", + "fourstep", "IRLS", "OLS"), reweight.tol = 1e-08, reweight.max.iter = 10, trace_parms = FALSE, @@ -414,82 +422,7 @@ estimators.

Examples

# Use shorthand notation for parent only degradation -fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) -summary(fit)
#> mkin version used for fitting: 0.9.49.11 -#> R version used for fitting: 3.6.3 -#> Date of fit: Mon Apr 20 18:52:22 2020 -#> Date of summary: Mon Apr 20 18:52:22 2020 -#> -#> Equations: -#> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent -#> -#> Model predictions using solution type analytical -#> -#> Fitted using 222 model solutions performed in 0.473 s -#> -#> Error model: Constant variance -#> -#> Error model algorithm: OLS -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 85.1 state -#> alpha 1.0 deparm -#> beta 10.0 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 85.100000 -Inf Inf -#> log_alpha 0.000000 -Inf Inf -#> log_beta 2.302585 -Inf Inf -#> -#> Fixed parameter values: -#> None -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 85.87000 1.8070 81.23000 90.5200 -#> log_alpha 0.05192 0.1353 -0.29580 0.3996 -#> log_beta 0.65100 0.2287 0.06315 1.2390 -#> sigma 1.85700 0.4378 0.73200 2.9830 -#> -#> Parameter correlation: -#> parent_0 log_alpha log_beta sigma -#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.758e-08 -#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.007e-07 -#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.568e-08 -#> sigma 4.758e-08 1.007e-07 8.568e-08 1.000e+00 -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 85.870 47.530 3.893e-08 81.2300 90.520 -#> alpha 1.053 7.393 3.562e-04 0.7439 1.491 -#> beta 1.917 4.373 3.601e-03 1.0650 3.451 -#> sigma 1.857 4.243 4.074e-03 0.7320 2.983 -#> -#> FOCUS Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.657 3 6 -#> parent 6.657 3 6 -#> -#> Estimated disappearance times: -#> DT50 DT90 DT50back -#> parent 1.785 15.15 4.56 -#> -#> Data: -#> time variable observed predicted residual -#> 0 parent 85.1 85.875 -0.7749 -#> 1 parent 57.9 55.191 2.7091 -#> 3 parent 29.9 31.845 -1.9452 -#> 7 parent 14.6 17.012 -2.4124 -#> 14 parent 9.7 9.241 0.4590 -#> 28 parent 6.6 4.754 1.8460 -#> 63 parent 4.0 2.102 1.8977 -#> 91 parent 3.9 1.441 2.4590 -#> 119 parent 0.6 1.092 -0.4919
+fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE)
#> Error in (function (t, parent_0, alpha, beta) { parent = parent_0/(t/beta + 1)^alpha})(t = c(0, 1, 1.2020202020202, 2.4040404040404, 3, 3.60606060606061, 4.80808080808081, 6.01010101010101, 7, 7.21212121212121, 8.41414141414141, 9.61616161616162, 10.8181818181818, 12.020202020202, 13.2222222222222, 14, 14.4242424242424, 15.6262626262626, 16.8282828282828, 18.030303030303, 19.2323232323232, 20.4343434343434, 21.6363636363636, 22.8383838383838, 24.040404040404, 25.2424242424242, 26.4444444444444, 27.6464646464646, 28, 28.8484848484848, 30.050505050505, 31.2525252525253, 32.4545454545455, 33.6565656565657, 34.8585858585859, 36.0606060606061, 37.2626262626263, 38.4646464646465, 39.6666666666667, 40.8686868686869, 42.0707070707071, 43.2727272727273, 44.4747474747475, 45.6767676767677, 46.8787878787879, 48.0808080808081, 49.2828282828283, 50.4848484848485, 51.6868686868687, 52.8888888888889, 54.0909090909091, 55.2929292929293, 56.4949494949495, 57.6969696969697, 58.8989898989899, 60.1010101010101, 61.3030303030303, 62.5050505050505, 63, 63.7070707070707, 64.9090909090909, 66.1111111111111, 67.3131313131313, 68.5151515151515, 69.7171717171717, 70.9191919191919, 72.1212121212121, 73.3232323232323, 74.5252525252525, 75.7272727272727, 76.9292929292929, 78.1313131313131, 79.3333333333333, 80.5353535353535, 81.7373737373737, 82.9393939393939, 84.1414141414141, 85.3434343434343, 86.5454545454545, 87.7474747474747, 88.9494949494949, 90.1515151515152, 91, 91.3535353535353, 92.5555555555556, 93.7575757575758, 94.959595959596, 96.1616161616162, 97.3636363636364, 98.5656565656566, 99.7676767676768, 100.969696969697, 102.171717171717, 103.373737373737, 104.575757575758, 105.777777777778, 106.979797979798, 108.181818181818, 109.383838383838, 110.585858585859, 111.787878787879, 112.989898989899, 114.191919191919, 115.393939393939, 116.59595959596, 117.79797979798, 119), parent.0 = c(parent = 85.1), alpha = 1, beta = 10): unbenutztes Argument (parent.0 = 85.1)
#> Timing stopped at: 0 0 0.001
summary(fit)
#> Error in summary(fit): Objekt 'fit' nicht gefunden
# One parent compound, one metabolite, both single first order. # Use mkinsub for convenience in model formulation. Pathway to sink included per default. SFO_SFO <- mkinmod( @@ -497,7 +430,8 @@ estimators.

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)))
#> Warning: Observations with value of zero were removed from the data
#> User System verstrichen -#> 1.465 0.003 1.474
coef(fit)
#> NULL
#> $ff +#> 1.526 0.000 1.526
parms(fit)
#> parent_0 k_parent_sink k_parent_m1 k_m1_sink sigma +#> 99.598483069 0.047920122 0.050777612 0.005260651 3.125503875
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -567,7 +501,8 @@ estimators.

#> Sum of squared residuals at call 126: 371.2134 #> Sum of squared residuals at call 135: 371.2134 #> Negative log-likelihood at call 145: 97.22429
#> Optimisation successfully terminated.
#> User System verstrichen -#> 1.052 0.000 1.068
coef(fit.deSolve)
#> NULL
endpoints(fit.deSolve)
#> $ff +#> 1.084 0.000 1.085
parms(fit.deSolve)
#> parent_0 k_parent_sink k_parent_m1 k_m1_sink sigma +#> 99.598483072 0.047920122 0.050777612 0.005260651 3.125503874
endpoints(fit.deSolve)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -583,25 +518,23 @@ estimators.

parent = mkinsub("FOMC", "m1"), m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
# Use starting parameters from parent only FOMC fit -fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, quiet = TRUE) -fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE, - parms.ini = fit.FOMC$bparms.ode)
#> Warning: Observations with value of zero were removed from the data
+fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, quiet = TRUE)
#> Error in (function (t, parent_0, alpha, beta) { parent = parent_0/(t/beta + 1)^alpha})(t = c(0, 0.757575757575758, 1, 1.51515151515152, 2.27272727272727, 3, 3.03030303030303, 3.78787878787879, 4.54545454545454, 5.3030303030303, 6.06060606060606, 6.81818181818182, 7, 7.57575757575758, 8.33333333333333, 9.09090909090909, 9.84848484848485, 10.6060606060606, 11.3636363636364, 12.1212121212121, 12.8787878787879, 13.6363636363636, 14, 14.3939393939394, 15.1515151515152, 15.9090909090909, 16.6666666666667, 17.4242424242424, 18.1818181818182, 18.9393939393939, 19.6969696969697, 20.4545454545455, 21, 21.2121212121212, 21.969696969697, 22.7272727272727, 23.4848484848485, 24.2424242424242, 25, 25.7575757575758, 26.5151515151515, 27.2727272727273, 28.030303030303, 28.7878787878788, 29.5454545454545, 30.3030303030303, 31.0606060606061, 31.8181818181818, 32.5757575757576, 33.3333333333333, 34.0909090909091, 34.8484848484849, 35, 35.6060606060606, 36.3636363636364, 37.1212121212121, 37.8787878787879, 38.6363636363636, 39.3939393939394, 40.1515151515151, 40.9090909090909, 41.6666666666667, 42.4242424242424, 43.1818181818182, 43.9393939393939, 44.6969696969697, 45.4545454545455, 46.2121212121212, 46.969696969697, 47.7272727272727, 48.4848484848485, 49.2424242424242, 50, 50.7575757575758, 51.5151515151515, 52.2727272727273, 53.030303030303, 53.7878787878788, 54.5454545454545, 55.3030303030303, 56.0606060606061, 56.8181818181818, 57.5757575757576, 58.3333333333333, 59.0909090909091, 59.8484848484849, 60.6060606060606, 61.3636363636364, 62.1212121212121, 62.8787878787879, 63.6363636363636, 64.3939393939394, 65.1515151515152, 65.9090909090909, 66.6666666666667, 67.4242424242424, 68.1818181818182, 68.9393939393939, 69.6969696969697, 70.4545454545455, 71.2121212121212, 71.969696969697, 72.7272727272727, 73.4848484848485, 74.2424242424242, 75), parent.0 = c(parent = 100.75), alpha = 1, beta = 10): unbenutztes Argument (parent.0 = 100.75)
#> Timing stopped at: 0 0 0.001
fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE, + parms.ini = fit.FOMC$bparms.ode)
#> Warning: Observations with value of zero were removed from the data
#> Error in mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE, parms.ini = fit.FOMC$bparms.ode): Objekt 'fit.FOMC' nicht gefunden
# Use stepwise fitting, using optimised parameters from parent only fit, SFORB SFORB_SFO <- mkinmod( parent = list(type = "SFORB", to = "m1", sink = TRUE), m1 = list(type = "SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
fit.SFORB_SFO.deSolve <- mkinfit(SFORB_SFO, FOCUS_2006_D, solution_type = "deSolve", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
# Use starting parameters from parent only SFORB fit (not really needed in this case) -fit.SFORB = mkinfit("SFORB", FOCUS_2006_D, quiet = TRUE) -fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
# } +fit.SFORB = mkinfit("SFORB", FOCUS_2006_D, quiet = TRUE)
#> Error in (function (t, parent_0, k_12, k_21, k_1output) { sqrt_exp = sqrt(1/4 * (k_12 + k_21 + k_1output)^2 + k_12 * k_21 - (k_12 + k_1output) * k_21) b1 = 0.5 * (k_12 + k_21 + k_1output) + sqrt_exp b2 = 0.5 * (k_12 + k_21 + k_1output) - sqrt_exp parent = parent_0 * (((k_12 + k_21 - b1)/(b2 - b1)) * exp(-b1 * t) + ((k_12 + k_21 - b2)/(b1 - b2)) * exp(-b2 * t))})(t = c(0, 0.757575757575758, 1, 1.51515151515152, 2.27272727272727, 3, 3.03030303030303, 3.78787878787879, 4.54545454545454, 5.3030303030303, 6.06060606060606, 6.81818181818182, 7, 7.57575757575758, 8.33333333333333, 9.09090909090909, 9.84848484848485, 10.6060606060606, 11.3636363636364, 12.1212121212121, 12.8787878787879, 13.6363636363636, 14, 14.3939393939394, 15.1515151515152, 15.9090909090909, 16.6666666666667, 17.4242424242424, 18.1818181818182, 18.9393939393939, 19.6969696969697, 20.4545454545455, 21, 21.2121212121212, 21.969696969697, 22.7272727272727, 23.4848484848485, 24.2424242424242, 25, 25.7575757575758, 26.5151515151515, 27.2727272727273, 28.030303030303, 28.7878787878788, 29.5454545454545, 30.3030303030303, 31.0606060606061, 31.8181818181818, 32.5757575757576, 33.3333333333333, 34.0909090909091, 34.8484848484849, 35, 35.6060606060606, 36.3636363636364, 37.1212121212121, 37.8787878787879, 38.6363636363636, 39.3939393939394, 40.1515151515151, 40.9090909090909, 41.6666666666667, 42.4242424242424, 43.1818181818182, 43.9393939393939, 44.6969696969697, 45.4545454545455, 46.2121212121212, 46.969696969697, 47.7272727272727, 48.4848484848485, 49.2424242424242, 50, 50.7575757575758, 51.5151515151515, 52.2727272727273, 53.030303030303, 53.7878787878788, 54.5454545454545, 55.3030303030303, 56.0606060606061, 56.8181818181818, 57.5757575757576, 58.3333333333333, 59.0909090909091, 59.8484848484849, 60.6060606060606, 61.3636363636364, 62.1212121212121, 62.8787878787879, 63.6363636363636, 64.3939393939394, 65.1515151515152, 65.9090909090909, 66.6666666666667, 67.4242424242424, 68.1818181818182, 68.9393939393939, 69.6969696969697, 70.4545454545455, 71.2121212121212, 71.969696969697, 72.7272727272727, 73.4848484848485, 74.2424242424242, 75), parent.0 = c(parent_free = 100.75), k_1output = 0.1, k_12 = 0.1, k_21 = 0.02): unbenutztes Argument (parent.0 = 100.75)
#> Timing stopped at: 0.001 0 0.001
fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> Error in mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode, quiet = TRUE): Objekt 'fit.SFORB' nicht gefunden
# } # \dontrun{ # Weighted fits, including IRLS SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), 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)
#> Warning: Observations with value of zero were removed from the data
summary(f.noweight)
#> mkin version used for fitting: 0.9.49.11 -#> R version used for fitting: 3.6.3 -#> Date of fit: Mon Apr 20 18:52:37 2020 -#> Date of summary: Mon Apr 20 18:52:37 2020 +#> R version used for fitting: 4.0.0 +#> Date of fit: Thu May 7 08:59:03 2020 +#> Date of summary: Thu May 7 08:59:03 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -609,7 +542,7 @@ estimators.

#> #> Model predictions using solution type deSolve #> -#> Fitted using 422 model solutions performed in 1.087 s +#> Fitted using 422 model solutions performed in 1.106 s #> #> Error model: Constant variance #> @@ -716,9 +649,9 @@ estimators.

#> 100 m1 33.13 31.98163 1.148e+00 #> 120 m1 25.15 28.78984 -3.640e+00 #> 120 m1 33.31 28.78984 4.520e+00
f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.obs)
#> mkin version used for fitting: 0.9.49.11 -#> R version used for fitting: 3.6.3 -#> Date of fit: Mon Apr 20 18:52:40 2020 -#> Date of summary: Mon Apr 20 18:52:40 2020 +#> R version used for fitting: 4.0.0 +#> Date of fit: Thu May 7 08:59:06 2020 +#> Date of summary: Thu May 7 08:59:06 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -726,7 +659,7 @@ estimators.

#> #> Model predictions using solution type deSolve #> -#> Fitted using 979 model solutions performed in 2.518 s +#> Fitted using 979 model solutions performed in 2.604 s #> #> Error model: Variance unique to each observed variable #> @@ -848,9 +781,9 @@ estimators.

#> 100 m1 33.13 31.98773 1.142e+00 #> 120 m1 25.15 28.80429 -3.654e+00 #> 120 m1 33.31 28.80429 4.506e+00
f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.tc)
#> mkin version used for fitting: 0.9.49.11 -#> R version used for fitting: 3.6.3 -#> Date of fit: Mon Apr 20 18:52:50 2020 -#> Date of summary: Mon Apr 20 18:52:50 2020 +#> R version used for fitting: 4.0.0 +#> Date of fit: Thu May 7 08:59:16 2020 +#> Date of summary: Thu May 7 08:59:16 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -858,7 +791,7 @@ estimators.

#> #> Model predictions using solution type deSolve #> -#> Fitted using 2552 model solutions performed in 10.186 s +#> Fitted using 2552 model solutions performed in 10.544 s #> #> Error model: Two-component variance function #> @@ -977,20 +910,10 @@ estimators.

- @@ -1001,7 +924,7 @@ estimators.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index b25f2da3..d1204e2e 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -40,7 +44,6 @@ name to a list, specifying the kinetic model type and reaction or transfer to other observed compartments. Instead of specifying several expressions, a list of lists can be given in the speclist argument." /> - @@ -58,7 +61,7 @@ list of lists can be given in the speclist argument." /> - +
@@ -116,7 +119,12 @@ list of lists can be given in the speclist argument." />
@@ -131,7 +139,7 @@ list of lists can be given in the speclist argument." />
@@ -205,7 +213,7 @@ applicable to give detailed information about the C function being built.

use_of_ff

The content of use_of_ff is passed on in this list component.

coefmat

The coefficient matrix, if the system of differential equations can be represented by one.

-
ll

The likelihood function, taking the parameter vector as the first argument.

+
cf

If generated, the compiled function as returned by cfunction.

Details

@@ -244,7 +252,7 @@ in the FOCUS and NAFTA guidance documents are used.

SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), verbose = TRUE)
#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file414965c335f6.c 2> file414965c335f6.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file66a9718e919b.c 2> file66a9718e919b.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: @@ -277,19 +285,10 @@ in the FOCUS and NAFTA guidance documents are used.

quiet = TRUE) # }
- @@ -300,7 +299,7 @@ in the FOCUS and NAFTA guidance documents are used.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index fe5bc975..689fb7c7 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -39,7 +43,6 @@ - @@ -57,7 +60,7 @@ kinetic parameters and initial values for the state variables." /> - +
@@ -115,7 +118,12 @@ kinetic parameters and initial values for the state variables." />
@@ -130,7 +138,7 @@ kinetic parameters and initial values for the state variables." />
@@ -258,32 +266,11 @@ solver is used.

Examples

- SFO <- mkinmod(degradinol = mkinsub("SFO")) - # Compare solution types - mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - solution_type = "analytical")
#> time degradinol -#> 1 0 100.0000000 -#> 2 1 74.0818221 -#> 3 2 54.8811636 -#> 4 3 40.6569660 -#> 5 4 30.1194212 -#> 6 5 22.3130160 -#> 7 6 16.5298888 -#> 8 7 12.2456428 -#> 9 8 9.0717953 -#> 10 9 6.7205513 -#> 11 10 4.9787068 -#> 12 11 3.6883167 -#> 13 12 2.7323722 -#> 14 13 2.0241911 -#> 15 14 1.4995577 -#> 16 15 1.1108997 -#> 17 16 0.8229747 -#> 18 17 0.6096747 -#> 19 18 0.4516581 -#> 20 19 0.3345965 -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - solution_type = "deSolve")
#> time degradinol +SFO <- mkinmod(degradinol = mkinsub("SFO")) +# Compare solution types +mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + solution_type = "analytical")
#> Error in (function (t, parent_0, k) { parent = parent_0 * exp(-k * t)})(t = 0:20, parent.0 = c(degradinol = 100), k = 0.3): unbenutztes Argument (parent.0 = 100)
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + solution_type = "deSolve")
#> time degradinol #> 1 0 100.0000000 #> 2 1 74.0818221 #> 3 2 54.8811636 @@ -304,8 +291,8 @@ solver is used.

#> 18 17 0.6096747 #> 19 18 0.4516581 #> 20 19 0.3345965 -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - solution_type = "deSolve", use_compiled = FALSE)
#> time degradinol +#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + solution_type = "deSolve", use_compiled = FALSE)
#> time degradinol #> 1 0 100.0000000 #> 2 1 74.0818221 #> 3 2 54.8811636 @@ -326,8 +313,8 @@ solver is used.

#> 18 17 0.6096747 #> 19 18 0.4516581 #> 20 19 0.3345965 -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - solution_type = "eigen")
#> time degradinol +#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + solution_type = "eigen")
#> time degradinol #> 1 0 100.0000000 #> 2 1 74.0818221 #> 3 2 54.8811636 @@ -349,92 +336,68 @@ solver is used.

#> 19 18 0.4516581 #> 20 19 0.3345965 #> 21 20 0.2478752
- - # Compare integration methods to analytical solution - mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - solution_type = "analytical")[21,]
#> time degradinol -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - method = "lsoda")[21,]
#> time degradinol -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - method = "ode45")[21,]
#> time degradinol -#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, - method = "rk4")[21,]
#> time degradinol -#> 21 20 0.2480043
# rk4 is not as precise here - - # The number of output times used to make a lot of difference until the - # default for atol was adjusted - mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), - seq(0, 20, by = 0.1))[201,]
#> time degradinol -#> 201 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), - seq(0, 20, by = 0.01))[2001,]
#> time degradinol +# Compare integration methods to analytical solution +mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + solution_type = "analytical")[21,]
#> Error in (function (t, parent_0, k) { parent = parent_0 * exp(-k * t)})(t = 0:20, parent.0 = c(degradinol = 100), k = 0.3): unbenutztes Argument (parent.0 = 100)
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + method = "lsoda")[21,]
#> time degradinol +#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + method = "ode45")[21,]
#> time degradinol +#> 21 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20, + method = "rk4")[21,]
#> time degradinol +#> 21 20 0.2480043
# rk4 is not as precise here + +# The number of output times used to make a lot of difference until the +# default for atol was adjusted +mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), + seq(0, 20, by = 0.1))[201,]
#> time degradinol +#> 201 20 0.2478752
mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), + seq(0, 20, by = 0.01))[2001,]
#> time degradinol #> 2001 20 0.2478752
- # Check compiled model versions - they are faster than the eigenvalue based solutions! - SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"), - m1 = list(type = "SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
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 = "eigen")[201,]))
#> time parent m1 -#> 201 20 4.978707 27.46227
#> User System verstrichen -#> 0.003 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.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.021 0.000 0.021
- # \dontrun{ - # Predict from a fitted model - f <- mkinfit(SFO_SFO, FOCUS_2006_C)
#> Ordinary least squares optimisation
#> Sum of squared residuals at call 1: 552.5739 -#> Sum of squared residuals at call 3: 552.5739 -#> Sum of squared residuals at call 4: 552.5739 -#> Sum of squared residuals at call 6: 279.9345 -#> Sum of squared residuals at call 7: 279.9344 -#> Sum of squared residuals at call 8: 279.9294 -#> Sum of squared residuals at call 9: 279.9294 -#> Sum of squared residuals at call 12: 200.3629 -#> Sum of squared residuals at call 13: 200.3629 -#> Sum of squared residuals at call 18: 197.904 -#> Sum of squared residuals at call 22: 197.904 -#> Sum of squared residuals at call 25: 196.6753 -#> Sum of squared residuals at call 27: 196.6753 -#> Sum of squared residuals at call 32: 196.5742 -#> Sum of squared residuals at call 33: 196.5742 -#> Sum of squared residuals at call 34: 196.5742 -#> Sum of squared residuals at call 38: 196.5361 -#> Sum of squared residuals at call 40: 196.5361 -#> Sum of squared residuals at call 44: 196.5336 -#> Sum of squared residuals at call 45: 196.5336 -#> Sum of squared residuals at call 50: 196.5334 -#> Sum of squared residuals at call 51: 196.5334 -#> Sum of squared residuals at call 52: 196.5334 -#> Sum of squared residuals at call 56: 196.5334 -#> Sum of squared residuals at call 58: 196.5334 -#> Sum of squared residuals at call 59: 196.5334 -#> Sum of squared residuals at call 65: 196.5334 -#> Negative log-likelihood at call 75: 26.64668
#> Optimisation successfully terminated.
head(mkinpredict(f))
#> time parent m1 +# Check compiled model versions - they are faster than the eigenvalue based solutions! +SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"), + m1 = list(type = "SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
if(require(rbenchmark)) { + benchmark( + eigen = 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 = "eigen")[201,], + deSolve_compiled = 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,], + deSolve = 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,], + replications = 10) +}
#> Lade nötiges Paket: rbenchmark
#> test replications elapsed relative user.self sys.self user.child +#> 3 deSolve 10 0.229 28.625 0.229 0 0 +#> 2 deSolve_compiled 10 0.008 1.000 0.008 0 0 +#> 1 eigen 10 0.025 3.125 0.026 0 0 +#> sys.child +#> 3 0 +#> 2 0 +#> 1 0
+# Since mkin 0.9.49.11 we also have analytical solutions for some models, including SFO-SFO +# deSolve = 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 = "analytical", use_compiled = FALSE)[201,], + +# \dontrun{ + # Predict from a fitted model + f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE) + head(mkinpredict(f))
#> time parent m1 #> 1 0.0 82.49216 0.000000 #> 2 0.1 80.00563 1.179963 #> 3 0.2 77.59404 2.312596 #> 4 0.3 75.25515 3.399443 #> 5 0.4 72.98675 4.442000 -#> 6 0.5 70.78673 5.441717
# } +#> 6 0.5 70.78673 5.441717
# }
- @@ -445,7 +408,7 @@ solver is used.

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

-- cgit v1.2.1