From 9ac853c7ceece333099021974025d07e75be2b33 Mon Sep 17 00:00:00 2001
From: Johannes Ranke Support SFORB with formation fractions As in the generic method (a numeric value for single fits, or a
- dataframe if there are several fits in the column).
-mkin 0.9.50.1 (unreleased) Unreleased
+mkin 0.9.50.1 (unreleased) 2020-05-11
Value
Examples
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 +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
+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-kineticsOther parent solutions: diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index 369398d5..f8fbd2ba 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -73,7 +73,7 @@ a decreasing rate constant." />
The solution of the FOMC kinetic model reduces to the
- SFO.solution
for large values of alpha
and
- beta
with \(k = \frac{\beta}{\alpha}\).
SFO.solution
for large values of alpha
and
+beta
with \(k = \frac{\beta}{\alpha}\).
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
+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-kineticsFOCUS (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
+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-kineticsGustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: - A new model based on spatial variability. Environmental Science and - Technology 24, 1032-1038
+A new model based on spatial variability. Environmental Science and +Technology 24, 1032-1038Other parent solutions: diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index 2684ee60..9404893c 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -73,7 +73,7 @@ between them." />
k2
.
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 +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
+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-kineticsOther parent solutions: diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index f197cb08..194d11aa 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -73,7 +73,7 @@ a concentration dependent rate constant." />
The solution of the IORE kinetic model reduces to the
- SFO.solution
if N = 1. The parameters of the IORE model can
- be transformed to equivalent parameters of the FOMC mode - see the NAFTA
- guidance for details.
SFO.solution
if N = 1. The parameters of the IORE model can
+be transformed to equivalent parameters of the FOMC mode - see the NAFTA
+guidance for details.
NAFTA Technical Working Group on Pesticides (not dated) Guidance - for Evaluating and Calculating Degradation Kinetics in Environmental Media
+for Evaluating and Calculating Degradation Kinetics in Environmental MediaOther parent solutions: diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index 9664deb3..b263f2f3 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -72,7 +72,7 @@
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 +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
+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-kineticsOther parent solutions: diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index 504f209f..4ef85274 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -76,7 +76,7 @@ and no substance in the bound fraction." />
The value of the response variable, which is the sum of free and
- bound fractions at time t
.
t
.
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 +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
+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-kineticsOther parent solutions: diff --git a/docs/reference/add_err-1.png b/docs/reference/add_err-1.png index 3018ff7f..88806d7b 100644 Binary files a/docs/reference/add_err-1.png and b/docs/reference/add_err-1.png differ diff --git a/docs/reference/add_err-2.png b/docs/reference/add_err-2.png index d476bba1..6a806c2d 100644 Binary files a/docs/reference/add_err-2.png and b/docs/reference/add_err-2.png differ diff --git a/docs/reference/add_err-3.png b/docs/reference/add_err-3.png index 298f2ebd..1919a566 100644 Binary files a/docs/reference/add_err-3.png and b/docs/reference/add_err-3.png differ diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index ab499a19..c25bbe17 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -39,7 +43,6 @@ - @@ -57,7 +60,7 @@ may depend on the predicted value and is specified as a standard deviation." /> -
+R/add_err.R
add_err.Rd
A list of datasets compatible with mmkin
, i.e. the
- components of the list are datasets compatible with mkinfit
.
mkinfit
.
Ranke J and Lehmann R (2015) To t-test or not to t-test, that is @@ -236,28 +244,21 @@ http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf
d_SFO_SFO_err, cores = 1, quiet = TRUE) -plot(f_SFO_SFO)R/confint.mkinfit.R
confint.mkinfit.Rd
The number of cores to be used for multicore processing. +
The number of cores to be used for multicore processing. On Windows machines, cores > 1 is currently not supported.
A matrix with columns giving lower and upper confidence limits for - each parameter.
+each parameter.Bates DM and Watts GW (1988) Nonlinear regression analysis & its applications
Pawitan Y (2013) In all likelihood - Statistical modelling and - inference using likelihood. Clarendon Press, Oxford.
+inference using likelihood. Clarendon Press, Oxford.Venzon DJ and Moolgavkar SH (1988) A Method for Computing - Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, - 87–94.
+Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, +87–94.- @@ -370,7 +394,7 @@ On Windows machines, cores > 1 is currently not supported. diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index ef38c521..05d65191 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -11,23 +11,27 @@ with mkinfit — endpoints • mkin - + - + - + + + + + - - + + - + - - + + @@ -43,7 +47,6 @@ from kinetic models fitted with mkinfit. If the SFORB model was specified for one of the parents or metabolites, the Eigenvalues are returned. These are equivalent to the rate constantes of the DFOP model, but with the advantage that the SFORB model can also be used for metabolites." /> - @@ -61,7 +64,7 @@ advantage that the SFORB model can also be used for metabolites." /> - +f <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE) @@ -262,50 +270,71 @@ On Windows machines, cores > 1 is currently not supported. SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), use_of_ff = "max", quiet = TRUE) f_d_1 <- mkinfit(SFO_SFO, subset(FOCUS_2006_D, value != 0), quiet = TRUE) -system.time(ci_profile <- confint(f_d_1, method = "profile", cores = 1, quiet = TRUE))#> Error in mkinpredict.mkinmod(mkinmod, parms, odeini, outtimes, solution_type = solution_type, use_compiled = use_compiled, method.ode = method.ode, atol = atol, rtol = rtol, ...): Differential equations were not integrated for all output times because -#> NaN values occurred in output from ode()#># Using more cores does not save much time here, as parent_0 takes up most of the time +system.time(ci_profile <- confint(f_d_1, method = "profile", cores = 1, quiet = TRUE))#> User System verstrichen +#> 3.362 0.000 3.364# Using more cores does not save much time here, as parent_0 takes up most of the time # If we additionally exclude parent_0 (the confidence of which is often of # minor interest), we get a nice performance improvement from about 50 # seconds to about 12 seconds if we use at least four cores system.time(ci_profile_no_parent_0 <- confint(f_d_1, method = "profile", - c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores))#>#> User System verstrichen -#> 20.058 0.122 11.784ci_profile#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden#> 2.5% 97.5% -#> parent_0 96.403841641 1.027931e+02 -#> k_parent_sink 0.041033378 5.596269e-02 -#> k_parent_m1 0.046777902 5.511931e-02 -#> k_m1_sink 0.004012217 6.897547e-03 -#> sigma 2.396089689 3.854918e+00ci_quadratic_untransformed <- confint(f_d_1, method = "quadratic", transformed = FALSE) -ci_quadratic_untransformed#> 2.5% 97.5% -#> parent_0 96.403841648 102.79312450 -#> k_parent_sink 0.040485331 0.05535491 -#> k_parent_m1 0.046611582 0.05494364 -#> k_m1_sink 0.003835483 0.00668582 -#> sigma 2.396089689 3.85491806# Against the expectation based on Bates and Watts (1988), the confidence + c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores))#>#> Warning: scheduled cores 1, 2, 3 encountered errors in user code, all values of the jobs will be affected#> Error in dimnames(x) <- dn: Länge von 'dimnames' [2] ungleich der Arrayausdehnung#>ci_profile#> 2.5% 97.5% +#> parent_0 96.456003640 1.027703e+02 +#> k_parent 0.090911032 1.071578e-01 +#> k_m1 0.003892605 6.702778e-03 +#> f_parent_to_m1 0.471328495 5.611550e-01 +#> sigma 2.535612399 3.985263e+00#> 2.5% 97.5% +#> parent_0 96.403839460 1.027931e+02 +#> k_parent 0.090823790 1.072543e-01 +#> k_m1 0.004012216 6.897547e-03 +#> f_parent_to_m1 0.469118713 5.595960e-01 +#> sigma 2.396089689 3.854918e+00ci_quadratic_untransformed <- confint(f_d_1, method = "quadratic", transformed = FALSE) +ci_quadratic_untransformed#> 2.5% 97.5% +#> parent_0 96.403839413 1.027931e+02 +#> k_parent 0.090491931 1.069035e-01 +#> k_m1 0.003835483 6.685819e-03 +#> f_parent_to_m1 0.469113365 5.598386e-01 +#> sigma 2.396089689 3.854918e+00# Against the expectation based on Bates and Watts (1988), the confidence # intervals based on the internal parameter transformation are less # congruent with the likelihood based intervals. Note the superiority of the # interval based on the untransformed fit for k_m1_sink -rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile)#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefundenrel_diffs_transformed < rel_diffs_untransformed#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_untransformed' nicht gefunden+rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile) +rel_diffs_untransformed <- abs((ci_quadratic_untransformed - ci_profile)/ci_profile) +rel_diffs_transformed < rel_diffs_untransformed#> 2.5% 97.5% +#> parent_0 TRUE TRUE +#> k_parent TRUE TRUE +#> k_m1 FALSE FALSE +#> f_parent_to_m1 TRUE FALSE +#> sigma FALSE FALSE#> 2.5% 97.5% +#> parent_0 0.000541 0.000222 +#> k_parent 0.000960 0.000900 +#> k_m1 0.030700 0.029100 +#> f_parent_to_m1 0.004690 0.002780 +#> sigma 0.055000 0.032700#> 2.5% 97.5% +#> parent_0 0.000541 0.000222 +#> k_parent 0.004610 0.002370 +#> k_m1 0.014700 0.002530 +#> f_parent_to_m1 0.004700 0.002350 +#> sigma 0.055000 0.032700# Investigate a case with formation fractions f_d_2 <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), quiet = TRUE) ci_profile_ff <- confint(f_d_2, method = "profile", cores = n_cores)#>ci_profile_ff#> 2.5% 97.5% -#> parent_0 96.456003650 1.027703e+02 +#> parent_0 96.456003640 1.027703e+02 #> k_parent 0.090911032 1.071578e-01 #> k_m1 0.003892605 6.702778e-03 #> f_parent_to_m1 0.471328495 5.611550e-01 #> sigma 2.535612399 3.985263e+00#> 2.5% 97.5% -#> parent_0 96.403839992 1.027931e+02 +#> parent_0 96.403839460 1.027931e+02 #> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 -#> f_parent_to_m1 0.469118711 5.595960e-01 +#> f_parent_to_m1 0.469118713 5.595960e-01 #> sigma 2.396089689 3.854918e+00ci_quadratic_untransformed_ff <- confint(f_d_2, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed_ff#> 2.5% 97.5% -#> parent_0 96.403839944 1.027931e+02 +#> parent_0 96.403839413 1.027931e+02 #> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113362 5.598386e-01 +#> f_parent_to_m1 0.469113365 5.598386e-01 #> sigma 2.396089689 3.854918e+00rel_diffs_transformed_ff <- abs((ci_quadratic_transformed_ff - ci_profile_ff)/ci_profile_ff) rel_diffs_untransformed_ff <- abs((ci_quadratic_untransformed_ff - ci_profile_ff)/ci_profile_ff) # While the confidence interval for the parent rate constant is closer to @@ -318,15 +347,15 @@ On Windows machines, cores > 1 is currently not supported. #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE #> sigma FALSE FALSErel_diffs_transformed_ff#> 2.5% 97.5% -#> parent_0 0.0005408026 0.0002217846 -#> k_parent 0.0009596414 0.0009003877 -#> k_m1 0.0307277403 0.0290579212 -#> f_parent_to_m1 0.0046884168 0.0027782604 +#> parent_0 0.0005408080 0.0002217794 +#> k_parent 0.0009596417 0.0009003876 +#> k_m1 0.0307277370 0.0290579182 +#> f_parent_to_m1 0.0046884130 0.0027782556 #> sigma 0.0550252516 0.0327066836rel_diffs_untransformed_ff#> 2.5% 97.5% -#> parent_0 0.0005408031 0.0002217851 -#> k_parent 0.0046100089 0.0023730230 -#> k_m1 0.0146746442 0.0025300972 -#> f_parent_to_m1 0.0046997642 0.0023460268 +#> parent_0 0.0005408085 0.0002217799 +#> k_parent 0.0046100096 0.0023730229 +#> k_m1 0.0146746469 0.0025301011 +#> f_parent_to_m1 0.0046997599 0.0023460223 #> sigma 0.0550252516 0.0327066836# The profiling for the following fit does not finish in a reasonable time, # therefore we use the quadratic approximation @@ -337,29 +366,24 @@ On Windows machines, cores > 1 is currently not supported. DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data f_tc_2 <- mkinfit(m_synth_DFOP_par, DFOP_par_c, error_model = "tc", error_model_algorithm = "direct", quiet = TRUE) -confint(f_tc_2, method = "quadratic")#> 2.5% 97.5% -#> parent_0 94.596218141 106.19934683 -#> k_M1 0.037605440 0.04490756 -#> k_M2 0.008568747 0.01087674 -#> f_parent_to_M1 0.021466788 0.62023878 -#> f_parent_to_M2 0.015168650 0.37975352 -#> k1 0.273897581 0.33388066 -#> k2 0.018614556 0.02250379 -#> g 0.671943831 0.73583255 -#> sigma_low 0.251283700 0.83992071 -#> rsd_high 0.040411017 0.07662005#> 2.5% 97.5% -#> parent_0 94.59622 106.1993#> 2.5% 97.5% +#> parent_0 94.59613833 106.19939215 +#> k_M1 0.03760542 0.04490759 +#> k_M2 0.00856874 0.01087675 +#> f_parent_to_M1 0.02146166 0.62023888 +#> f_parent_to_M2 0.01516502 0.37975343 +#> k1 0.27389751 0.33388078 +#> k2 0.01861456 0.02250379 +#> g 0.67194349 0.73583256 +#> sigma_low 0.25128383 0.83992146 +#> rsd_high 0.04041100 0.07662001#> 2.5% 97.5% +#> parent_0 94.59614 106.1994# }
R/endpoints.R
endpoints.Rd
A list with a matrix of dissipation times named distimes, - and, if applicable, a vector of formation fractions named ff - and, if the SFORB model was in use, a vector of eigenvalues - of these SFORB models, equivalent to DFOP rate constants
+and, if applicable, a vector of formation fractions named ff +and, if the SFORB model was in use, a vector of eigenvalues +of these SFORB models, equivalent to DFOP rate constantsThe function is used internally by summary.mkinfit
.
A function that was likely previously assigned from within - nlme.mmkin
+nlme.mmkinThe result of the forward or backward transformation. The returned - components always sum to 1 for the case of the inverse log-ratio - transformation.
+components always sum to 1 for the case of the inverse log-ratio +transformation.Peter Filzmoser, Karel Hron (2008) Outlier Detection for - Compositional Data Using Robust Methods. Math Geosci 40 233-248
+Compositional Data Using Robust Methods. Math Geosci 40 233-248Another implementation can be found in R package
- robCompositions
.
robCompositions
.- @@ -202,7 +202,7 @@ sensible for vectors with all elements being greater than zero. diff --git a/docs/reference/logLik.mkinfit.html b/docs/reference/logLik.mkinfit.html index 9a54496e..8e33c28f 100644 --- a/docs/reference/logLik.mkinfit.html +++ b/docs/reference/logLik.mkinfit.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -41,7 +45,6 @@ observed value, as calculated as part of the fitting procedure using dnorm, i.e. assuming normal distribution, and with the means predicted by the degradation model, and the standard deviations predicted by the error model." /> - @@ -59,7 +62,7 @@ the error model." /> - +@@ -180,18 +188,10 @@ sensible for vectors with all elements being greater than zero. length(b) # Four elements#> [1] 4#> [1] 0.1 0.3 0.5
R/logLik.mkinfit.R
logLik.mkinfit.Rd
An object of class logLik
with the number of estimated
- parameters (degradation model parameters plus variance model parameters)
- as attribute.
The total number of estimated parameters returned with the value of the @@ -173,7 +181,7 @@ and the fitted error model parameters.
AIC.mmkin
.- @@ -211,7 +211,7 @@ and the fitted error model parameters. diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index b0ec77b1..9907297c 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -73,7 +73,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> @@ -179,19 +179,19 @@ an increasing rate constant, supposedly caused by microbial growth@@ -189,18 +197,10 @@ and the fitted error model parameters.
The solution of the logistic model reduces to the
- SFO.solution
if k0
is equal to kmax
.
SFO.solution
if k0
is equal to kmax
.
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 +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
+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-kineticsOther parent solutions: diff --git a/docs/reference/max_twa_parent.html b/docs/reference/max_twa_parent.html index ef2a55bf..b8ce5397 100644 --- a/docs/reference/max_twa_parent.html +++ b/docs/reference/max_twa_parent.html @@ -11,23 +11,27 @@ kinetic models fitted with mkinfit — max_twa_parent • mkin - + - + - + + + + + - - + + - + - - + + @@ -43,7 +47,6 @@ concentrations (TWAs) for kinetic models fitted with mkinfit. Currently, only calculations for the parent are implemented for the SFO, FOMC, DFOP and HS models, using the analytical formulas given in the PEC soil section of the FOCUS guidance." /> - @@ -61,7 +64,7 @@ soil section of the FOCUS guidance." /> -
+R/max_twa_parent.R
max_twa_parent.Rd
For max_twa_parent
, a numeric vector, named using the
- windows
argument. For the other functions, a numeric vector of
- length one (also known as 'a number').
windows
argument. For the other functions, a numeric vector of
+length one (also known as 'a number').
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
+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@@ -230,17 +238,10 @@ factor (f_twa) is calculated. #> 34.71343 18.22124
R/mkinerrplot.R
mkinerrplot.Rd
legend
...
- further arguments passed to plot
.
+ further arguments passed to plot
.
Value
Nothing is returned by this function, as it is called for its side
- effect, namely to produce a plot.
+effect, namely to produce a plot.
See also
mkinplot
, for a way to plot the data and the fitted
- lines of the mkinfit object.
+lines of the mkinfit object.
@@ -232,17 +240,10 @@ be passed on to- @@ -253,7 +254,7 @@ be passed on tolegend
legend diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 9974b66b..ceac59bf 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -78,7 +78,7 @@ likelihood function." /> @@ -209,15 +209,15 @@ detection.
parms.ini +needs. You can use the parameter lists "bparms.ode" from a previously +fitted model, which contains the differential equation parameters from +this model. This works nicely if the models are nested. An example is +given below. A named vector of initial values for the parameters, - including parameters to be optimised and potentially also fixed parameters - as indicated by
+including parameters to be optimised and potentially also fixed parameters +as indicated byfixed_parms
. If set to "auto", initial values for - rate constants are set to default values. Using parameter names that are - not in the model gives an error.fixed_parms
. If set to "auto", initial values for +rate constants are set to default values. Using parameter names that are +not in the model gives an error.It is possible to only specify a subset of the parameters that the model - needs. You can use the parameter lists "bparms.ode" from a previously - fitted model, which contains the differential equation parameters from - this model. This works nicely if the models are nested. An example is - given below.
state.ini @@ -326,42 +326,44 @@ is 1e-10, much lower than inlsoda
.error_model +error model similar to the one described by Rocke and Lorenzato (1995) is +used for setting up the likelihood function. Note that this model +deviates from the model by Rocke and Lorenzato, as their model implies +that the errors follow a lognormal distribution for large values, not a +normal distribution as assumed by this method. If the error model is "const", a constant standard - deviation is assumed.
+deviation is assumed.If the error model is "obs", each observed variable is assumed to have its - own variance.
+own variance.If the error model is "tc" (two-component error model), a two component - error model similar to the one described by Rocke and Lorenzato (1995) is - used for setting up the likelihood function. Note that this model - deviates from the model by Rocke and Lorenzato, as their model implies - that the errors follow a lognormal distribution for large values, not a - normal distribution as assumed by this method.
error_model_algorithm +unweighted least squares, and then iterates optimization of the error +model parameters and subsequent optimization of the degradation model +using those error model parameters, until the error model parameters +converge. If "auto", the selected algorithm depends on - the error model. If the error model is "const", unweighted nonlinear - least squares fitting ("OLS") is selected. If the error model is "obs", or - "tc", the "d_3" algorithm is selected.
-The algorithm "d_3" will directly minimize the negative log-likelihood and - - independently - also use the three step algorithm described below. The - fit with the higher likelihood is returned.
+the error model. If the error model is "const", unweighted nonlinear +least squares fitting ("OLS") is selected. If the error model is "obs", or +"tc", the "d_3" algorithm is selected. +The algorithm "d_3" will directly minimize the negative log-likelihood and
+
+- +
independently - also use the three step algorithm described below. The +fit with the higher likelihood is returned.
The algorithm "direct" will directly minimize the negative log-likelihood.
The algorithm "twostep" will minimize the negative log-likelihood after an - initial unweighted least squares optimisation step.
+initial unweighted least squares optimisation step.The algorithm "threestep" starts with unweighted least squares, then - optimizes only the error model using the degradation model parameters - found, and then minimizes the negative log-likelihood with free - degradation and error model parameters.
+optimizes only the error model using the degradation model parameters +found, and then minimizes the negative log-likelihood with free +degradation and error model parameters.The algorithm "fourstep" starts with unweighted least squares, then - optimizes only the error model using the degradation model parameters - found, then optimizes the degradation model again with fixed error model - parameters, and finally minimizes the negative log-likelihood with free - degradation and error model parameters.
+optimizes only the error model using the degradation model parameters +found, then optimizes the degradation model again with fixed error model +parameters, and finally minimizes the negative log-likelihood with free +degradation and error model parameters.The algorithm "IRLS" (Iteratively Reweighted Least Squares) starts with - unweighted least squares, and then iterates optimization of the error - model parameters and subsequent optimization of the degradation model - using those error model parameters, until the error model parameters - converge.
- reweight.tol @@ -383,14 +385,10 @@ the error model parameters in IRLS fits.Source
- -Rocke, David M. und Lorenzato, Stefan (1995) A two-component model - for measurement error in analytical chemistry. Technometrics 37(2), 176-184.
Value
A list with "mkinfit" in the class attribute. A summary can be - obtained by
+obtained bysummary.mkinfit
.summary.mkinfit
.Details
Per default, parameters in the kinetic models are internally transformed in @@ -399,33 +397,40 @@ estimators.
Note
When using the "IORE" submodel for metabolites, fitting with - "transform_rates = TRUE" (the default) often leads to failures of the - numerical ODE solver. In this situation it may help to switch off the - internal rate transformation.
+"transform_rates = TRUE" (the default) often leads to failures of the +numerical ODE solver. In this situation it may help to switch off the +internal rate transformation. +References
+ +Rocke DM and Lorenzato S (1995) A two-component model +for measurement error in analytical chemistry. Technometrics 37(2), 176-184.
+Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical +Degradation Data. Environments 6(12) 124 +doi:10.3390/environments6120124.
See also
+Plotting methods
+plot.mkinfit
and -mkinparplot
.mkinparplot
.Comparisons of models fitted to the same data can be made using -
+AIC
by virtue of the methodlogLik.mkinfit
.AIC
by virtue of the methodlogLik.mkinfit
.Fitting of several models to several datasets in a single call to -
mmkin
.mmkin
.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.50 +summary(fit)#> mkin version used for fitting: 0.9.50.1 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 11 05:14:26 2020 -#> Date of summary: Mon May 11 05:14:26 2020 +#> Date of fit: Tue May 12 08:36:07 2020 +#> Date of summary: Tue May 12 08:36:07 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.043 s +#> Fitted using 222 model solutions performed in 0.047 s #> #> Error model: Constant variance #> @@ -502,7 +507,7 @@ estimators. m1 = mkinsub("SFO"))#># 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 -#> 0.407 0.002 0.409parms(fit)#> parent_0 k_parent k_m1 f_parent_to_m1 sigma +#> 0.408 0.008 0.416parms(fit)#> parent_0 k_parent k_m1 f_parent_to_m1 sigma #> 99.598483222 0.098697734 0.005260651 0.514475962 3.125503875endpoints(fit)#> $ff #> parent_m1 parent_sink #> 0.514476 0.485524 @@ -592,7 +597,7 @@ estimators. #> Sum of squared residuals at call 166: 371.2134 #> Sum of squared residuals at call 168: 371.2134 #> Negative log-likelihood at call 178: 97.22429#>#> User System verstrichen -#> 0.349 0.000 0.350parms(fit.deSolve)#> parent_0 k_parent k_m1 f_parent_to_m1 sigma +#> 0.350 0.001 0.351parms(fit.deSolve)#> parent_0 k_parent k_m1 f_parent_to_m1 sigma #> 99.598480759 0.098697739 0.005260651 0.514475958 3.125503874endpoints(fit.deSolve)#> $ff #> parent_m1 parent_sink #> 0.514476 0.485524 @@ -622,12 +627,12 @@ estimators. 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#> Warning: Initial parameter(s) k_parent_free_sink not used in the model# } # \dontrun{ -# Weighted fits, including IRLS +# Weighted fits, including IRLS (error_model = "obs") SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), - m1 = mkinsub("SFO"), use_of_ff = "max")#>f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.noweight)#>f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.noweight)#> mkin version used for fitting: 0.9.50.1 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 11 05:14:31 2020 -#> Date of summary: Mon May 11 05:14:31 2020 +#> Date of fit: Tue May 12 08:36:12 2020 +#> Date of summary: Tue May 12 08:36:12 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -635,7 +640,7 @@ estimators. #> #> Model predictions using solution type analytical #> -#> Fitted using 421 model solutions performed in 0.124 s +#> Fitted using 421 model solutions performed in 0.146 s #> #> Error model: Constant variance #> @@ -746,10 +751,10 @@ estimators. #> 100 m1 31.04 31.98163 -9.416e-01 #> 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+00f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.obs)#> mkin version used for fitting: 0.9.50 +#> 120 m1 33.31 28.78984 4.520e+00f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.obs)#> mkin version used for fitting: 0.9.50.1 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 11 05:14:32 2020 -#> Date of summary: Mon May 11 05:14:32 2020 +#> Date of fit: Tue May 12 08:36:13 2020 +#> Date of summary: Tue May 12 08:36:13 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -757,7 +762,7 @@ estimators. #> #> Model predictions using solution type analytical #> -#> Fitted using 978 model solutions performed in 0.336 s +#> Fitted using 978 model solutions performed in 0.337 s #> #> Error model: Variance unique to each observed variable #> @@ -883,10 +888,10 @@ estimators. #> 100 m1 31.04 31.98773 -9.477e-01 #> 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+00f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.tc)#> mkin version used for fitting: 0.9.50 +#> 120 m1 33.31 28.80429 4.506e+00f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)#> Warning: Observations with value of zero were removed from the datasummary(f.tc)#> mkin version used for fitting: 0.9.50.1 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 11 05:14:32 2020 -#> Date of summary: Mon May 11 05:14:32 2020 +#> Date of fit: Tue May 12 08:36:14 2020 +#> Date of summary: Tue May 12 08:36:14 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -894,7 +899,7 @@ estimators. #> #> Model predictions using solution type analytical #> -#> Fitted using 1875 model solutions performed in 0.642 s +#> Fitted using 1875 model solutions performed in 0.647 s #> #> Error model: Two-component variance function #> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 81b62ae1..1c97048e 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -75,7 +75,7 @@ list of lists can be given in the speclist argument." />@@ -205,15 +205,18 @@ applicable to give detailed information about the C function being built. ValueA list of class
+containing, among others,mkinmod
for use withmkinfit
, - containing, among others,diffs - A vector of string representations of differential equations, one for - each modelling variable.
map - A list containing named character vectors for each observed variable, - specifying the modelling variables by which it is represented.
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.
cf +each modelling variable. + If generated, the compiled function as returned by cfunction.
map + A list containing named character vectors for each observed variable, +specifying the modelling variables by which it is represented.
use_of_ff + The content of
use_of_ff
is passed on in this list component.deg_func + If generated, a function containing the solution of the degradation +model.
coefmat + The coefficient matrix, if the system of differential equations can be +represented by one.
cf If generated, a compiled function calculating the derivatives as +returned by cfunction.
Details
@@ -222,17 +225,17 @@ in the FOCUS and NAFTA guidance documents are used.Note
The IORE submodel is not well tested for metabolites. When using this - model for metabolites, you may want to read the second note in the help - page to
+model for metabolites, you may want to read the second note in the help +page tomkinfit
.mkinfit
.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
+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-kineticsNAFTA Technical Working Group on Pesticides (not dated) Guidance for - Evaluating and Calculating Degradation Kinetics in Environmental Media
+Evaluating and Calculating Degradation Kinetics in Environmental MediaExamples
- @@ -455,7 +445,7 @@ parameters taken from the mmkin object are used diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 2ede2dec..284c30a6 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -74,7 +74,7 @@ observed data together with the solution of the fitted model." /> @@ -255,7 +255,7 @@ fits is shown, the residual plot is in the lower third of the plot. Otherwise, i.e. if "sep_obs" is given, the residual plots will be located to the right of the plots of the fitted curves. If this is set to 'standardized', a plot of the residuals divided by the standard deviation - given by the fitted error model will be shown. +given by the fitted error model will be shown.@@ -252,7 +255,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 file1a1abf38df.c 2> file1a1abf38df.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file15d32c282a7d.c 2> file15d32c282a7d.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png index d4259579..6853a4ba 100644 Binary files a/docs/reference/mkinparplot-1.png and b/docs/reference/mkinparplot-1.png differ diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html index af936795..dfe695d0 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -38,7 +42,6 @@ - @@ -56,7 +59,7 @@ mkinfit." /> - +diff --git a/docs/reference/mkinresplot-1.png b/docs/reference/mkinresplot-1.png index d29181c3..bb9657b4 100644 Binary files a/docs/reference/mkinresplot-1.png and b/docs/reference/mkinresplot-1.png differ diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html index 698af302..cd6bf4a1 100644 --- a/docs/reference/mkinresplot.html +++ b/docs/reference/mkinresplot.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -40,7 +44,6 @@ variables from an mkinfit object. A combined plot of the fitted model and the residuals can be obtained using plot.mkinfit using the argument show_residuals = TRUE." /> - @@ -58,7 +61,7 @@ argument show_residuals = TRUE." /> - +@@ -129,7 +137,7 @@ mkinfit." />@@ -114,7 +117,12 @@ mkinfit." /> - @@ -183,7 +185,7 @@ mkinfit." />@@ -152,7 +160,7 @@ mkinfit." />Function to plot the confidence intervals obtained using mkinfit
- + Source:R/mkinparplot.R
mkinparplot.Rd
Value
Nothing is returned by this function, as it is called for its side - effect, namely to produce a plot.
+effect, namely to produce a plot.Examples
#>#> Warning: Observations with value of zero were removed from the datamkinparplot(fit)# }@@ -131,7 +139,7 @@ argument show_residuals = TRUE." />@@ -116,7 +119,12 @@ argument show_residuals = TRUE." /> @@ -216,36 +224,29 @@ be passed on tolegend
... -+ further arguments passed to
plot
.further arguments passed to
plot
.Value
Nothing is returned by this function, as it is called for its side - effect, namely to produce a plot.
+effect, namely to produce a plot.See also
+lines of the mkinfit object, and
mkinplot
, for a way to plot the data and the fitted - lines of the mkinfit object, andplot_res
for a function - combining the plot of the fit and the residual plot.plot_res
for a function +combining the plot of the fit and the residual plot.Examples
- @@ -256,7 +257,7 @@ be passed on to#>#> Warning: Observations with value of zero were removed from the datamkinresplot(fit, "m1")legend diff --git a/docs/reference/mmkin-1.png b/docs/reference/mmkin-1.png index 328cec9b..135d5446 100644 Binary files a/docs/reference/mmkin-1.png and b/docs/reference/mmkin-1.png differ diff --git a/docs/reference/mmkin-2.png b/docs/reference/mmkin-2.png index 7b1d73d5..40109afc 100644 Binary files a/docs/reference/mmkin-2.png and b/docs/reference/mmkin-2.png differ diff --git a/docs/reference/mmkin-3.png b/docs/reference/mmkin-3.png index 4c412abc..bce34531 100644 Binary files a/docs/reference/mmkin-3.png and b/docs/reference/mmkin-3.png differ diff --git a/docs/reference/mmkin-4.png b/docs/reference/mmkin-4.png index 201ef0fd..02976ced 100644 Binary files a/docs/reference/mmkin-4.png and b/docs/reference/mmkin-4.png differ diff --git a/docs/reference/mmkin-5.png b/docs/reference/mmkin-5.png index 29206932..56750342 100644 Binary files a/docs/reference/mmkin-5.png and b/docs/reference/mmkin-5.png differ diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index c1f62be7..db359f48 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -11,23 +11,27 @@ more datasets — mmkin • mkin - + - + - + + + + + - - + + - + - - + + @@ -40,7 +44,6 @@ more datasets — mmkin • mkin more datasets — mmkin" /> - @@ -58,7 +61,7 @@ datasets specified in its first two arguments." /> - +
@@ -132,7 +140,7 @@ datasets specified in its first two arguments." />@@ -116,7 +119,12 @@ datasets specified in its first two arguments." /> @@ -184,12 +192,12 @@ for parallel execution.Fit one or more kinetic models with one or more state variables to one or more datasets
- + Source:R/mmkin.R
mmkin.Rd
Value
A two-dimensional
+objects that can be indexed using the model names for the first index (row index) +and the dataset names for the second index (column index).array
ofmkinfit
- objects that can be indexed using the model names for the first index (row index) - and the dataset names for the second index (column index).See also
+plotting.
[.mmkin
for subsetting,plot.mmkin
for - plotting.Examples
- @@ -251,7 +252,7 @@ for parallel execution. diff --git a/docs/reference/nafta.html b/docs/reference/nafta.html index 60917ff4..02c44737 100644 --- a/docs/reference/nafta.html +++ b/docs/reference/nafta.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -41,7 +45,6 @@ and returns an object of class nafta that has methods for printing and plotting. Print nafta objects. The results for the three models are printed in the order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> - @@ -59,7 +62,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> - +@@ -205,42 +213,35 @@ for parallel execution. names(datasets) <- paste("Dataset", 1:3) time_default <- system.time(fits.0 <- mmkin(models, datasets, quiet = TRUE)) -time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) - +time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE))#> Warning: Optimisation did not converge: +#> false convergence (8)time_default#> User System verstrichen -#> 16.471 0.352 5.654time_1#> User System verstrichen -#> 19.578 0.000 19.590+#> 4.370 0.401 1.265time_1#> User System verstrichen +#> 5.000 0.008 5.011#> $ff #> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340480 0.2659520 0.7505686 0.2494314 +#> 0.7340478 0.2659522 0.7505691 0.2494309 #> #> $distimes #> DT50 DT90 -#> parent 0.8777689 2.915885 -#> M1 2.3257452 7.725958 -#> M2 33.7200890 112.015711 +#> parent 0.8777688 2.915885 +#> M1 2.3257466 7.725963 +#> M2 33.7200800 112.015681 #># Use double brackets to extract a single mkinfit object, which will be plotted # by plot.mkinfit and can be plotted using plot_sep -plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE)plot_sep(fits.0[[1, 1]]) +plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE)plot_sep(fits.0[[1, 1]]) # Plotting with mmkin (single brackets, extracting an mmkin object) does not # allow to plot the observed variables separately -plot(fits.0[1, 1])# }@@ -132,7 +140,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." />@@ -117,7 +120,12 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> @@ -186,20 +194,20 @@ dissipation times.- @@ -264,7 +265,7 @@ dissipation times. diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html index b92d2141..78489ee7 100644 --- a/docs/reference/nlme.html +++ b/docs/reference/nlme.html @@ -75,7 +75,7 @@ datasets." /> @@ -173,9 +173,9 @@ datasets.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
+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-22US 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
+Calculate Representative Half-life Values and Characterizing Pesticide +Degradation +https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidanceValue
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.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.Examples
@@ -240,20 +248,13 @@ dissipation times. #> DFOP 429 2380 841 #> #> Representative half-life: -#> [1] 841.41plot(nafta_evaluation)+#> [1] 841.41plot(nafta_evaluation)A function that can be used with nlme
If random is FALSE (default), a named vector containing mean values - of the fitted degradation model parameters. If random is TRUE, a list with - fixed and random effects, in the format required by the start argument of - nlme for the case of a single grouping variable ds?
+of the fitted degradation model parameters. If random is TRUE, a list with +fixed and random effects, in the format required by the start argument of +nlme for the case of a single grouping variable ds?A
groupedData
objectSee also
diff --git a/docs/reference/nlme.mmkin-1.png b/docs/reference/nlme.mmkin-1.png index 67bd07de..67f279da 100644 Binary files a/docs/reference/nlme.mmkin-1.png and b/docs/reference/nlme.mmkin-1.png differ diff --git a/docs/reference/nlme.mmkin-2.png b/docs/reference/nlme.mmkin-2.png index ee6bb2e4..16a5d7bd 100644 Binary files a/docs/reference/nlme.mmkin-2.png and b/docs/reference/nlme.mmkin-2.png differ diff --git a/docs/reference/nlme.mmkin-3.png b/docs/reference/nlme.mmkin-3.png index 1d5569e9..73426834 100644 Binary files a/docs/reference/nlme.mmkin-3.png and b/docs/reference/nlme.mmkin-3.png differ diff --git a/docs/reference/nlme.mmkin-4.png b/docs/reference/nlme.mmkin-4.png index 7249bd1e..9b46b425 100644 Binary files a/docs/reference/nlme.mmkin-4.png and b/docs/reference/nlme.mmkin-4.png differ diff --git a/docs/reference/nlme.mmkin-5.png b/docs/reference/nlme.mmkin-5.png index 26781b85..3398dd4a 100644 Binary files a/docs/reference/nlme.mmkin-5.png and b/docs/reference/nlme.mmkin-5.png differ diff --git a/docs/reference/nlme.mmkin-6.png b/docs/reference/nlme.mmkin-6.png index 5f5a759a..7b663991 100644 Binary files a/docs/reference/nlme.mmkin-6.png and b/docs/reference/nlme.mmkin-6.png differ diff --git a/docs/reference/nlme.mmkin-7.png b/docs/reference/nlme.mmkin-7.png index 1d4fa8ea..d2c38a63 100644 Binary files a/docs/reference/nlme.mmkin-7.png and b/docs/reference/nlme.mmkin-7.png differ diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html index 33cc9164..4e5a86cb 100644 --- a/docs/reference/nlme.mmkin.html +++ b/docs/reference/nlme.mmkin.html @@ -10,23 +10,27 @@ - + - + - + + + + + - - + + - + - - + + @@ -39,7 +43,6 @@ - @@ -57,7 +60,7 @@ have been obtained by fitting the same model to a list of datasets." /> - +@@ -130,7 +138,7 @@ have been obtained by fitting the same model to a list of datasets." />@@ -115,7 +118,12 @@ have been obtained by fitting the same model to a list of datasets." /> @@ -243,7 +251,7 @@ parameters taken from the mmkin object are usedValue
Upon success, a fitted nlme.mmkin object, which is an nlme object - with additional elements
+with additional elementsSee also
@@ -309,142 +317,124 @@ parameters taken from the mmkin object are used "FOMC-SFO" = m_fomc_sfo, "DFOP-SFO" = m_dfop_sfo), ds_2, quiet = TRUE) - plot(f_2["SFO-SFO", 3:4]) # Separate fits for datasets 3 and 4f_nlme_sfo_sfo <- nlme(f_2["SFO-SFO", ]) # plot(f_nlme_sfo_sfo) # not feasible with pkgdown figures - plot(f_nlme_sfo_sfo, 3:4) # Global mixed model: Fits for datasets 3 and 4# With formation fractions f_nlme_sfo_sfo_ff <- nlme(f_2["SFO-SFO-ff", ]) - plot(f_nlme_sfo_sfo_ff, 3:4) # chi2 different due to different df attribution# For more parameters, we need to increase pnlsMaxIter and the tolerance # to get convergence f_nlme_fomc_sfo <- nlme(f_2["FOMC-SFO", ], control = list(pnlsMaxIter = 100, tolerance = 1e-4), verbose = TRUE)#> #> **Iteration 1 -#> LME step: Loglik: -394.1603, nlminb iterations: 2 +#> LME step: Loglik: -394.1603, nlminb iterations: 3 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.2079984 0.8563873 1.7454146 1.0917723 1.2756924 +#> -0.2079793 0.8563830 1.7454105 1.0917354 1.2756825 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8786 -#> fixed effects: 94.17379 -5.473199 -0.6970239 -0.2025094 2.103883 +#> PNLS step: RSS = 643.8803 +#> fixed effects: 94.17379 -5.473193 -0.6970236 -0.2025091 2.103883 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 0.7865373 0.1448077 +#> 0.7960134 0.1447728 #> #> **Iteration 2 #> LME step: Loglik: -396.3824, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -1.712408e-01 -2.680989e-05 1.842119e+00 1.073975e+00 1.322924e+00 +#> -1.712404e-01 -2.432655e-05 1.842120e+00 1.073975e+00 1.322925e+00 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8022 -#> fixed effects: 94.17385 -5.473491 -0.6970405 -0.202514 2.103871 +#> PNLS step: RSS = 643.8035 +#> fixed effects: 94.17385 -5.473487 -0.6970404 -0.2025137 2.103871 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 5.341904e-05 1.227073e-03 +#> 5.382757e-05 1.236667e-03 #> #> **Iteration 3 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.1712484347 -0.0001513555 1.8420964843 1.0739800649 1.3229176990 +#> -0.1712499044 -0.0001499831 1.8420971364 1.0739799123 1.3229167796 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7947 -#> fixed effects: 94.17386 -5.473522 -0.6970423 -0.2025142 2.10387 +#> PNLS step: RSS = 643.7948 +#> fixed effects: 94.17386 -5.473521 -0.6970422 -0.2025144 2.10387 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 5.568186e-06 1.276609e-04 +#> 6.072817e-06 1.400857e-04 #> #> **Iteration 4 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: -#> ds1 ds2 ds3 ds4 ds5 -#> -0.171251200 -0.000164506 1.842095097 1.073980200 1.322916184 +#> ds1 ds2 ds3 ds4 ds5 +#> -0.1712529502 -0.0001641277 1.8420957542 1.0739797181 1.3229173076 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7934 +#> PNLS step: RSS = 643.7936 #> fixed effects: 94.17386 -5.473526 -0.6970426 -0.2025146 2.103869 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 2.332100e-06 1.979007e-05f_nlme_dfop_sfo <- nlme(f_2["DFOP-SFO", ], control = list(pnlsMaxIter = 120, tolerance = 5e-4), verbose = TRUE)#> #> **Iteration 1 -#> LME step: Loglik: -404.9591, nlminb iterations: 1 +#> LME step: Loglik: -404.9582, nlminb iterations: 1 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.4114594 0.9798456 1.6990016 0.7293119 0.3353829 1.7112922 +#> -0.4114355 0.9798697 1.6990037 0.7293315 0.3354323 1.7113046 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.391 -#> fixed effects: 93.82265 -5.455841 -0.6788837 -1.862191 -4.199654 0.05531046 +#> PNLS step: RSS = 630.3644 +#> fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.05532828 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 0.7872619 0.5811683 +#> 0.7885368 0.5822683 #> #> **Iteration 2 #> LME step: Loglik: -407.7755, nlminb iterations: 11 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.371222832 0.003084754 1.789952290 0.724634064 0.301559136 1.754244638 -#> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.359 -#> fixed effects: 93.82269 -5.456014 -0.6788967 -1.862202 -4.199678 0.05534118 -#> iterations: 120 -#> Convergence crit. (must all become <= tolerance = 0.0005): -#> fixed reStruct -#> 0.0005550885 0.0007749418 -#> -#> **Iteration 3 -#> LME step: Loglik: -407.7756, nlminb iterations: 11 -#> reStruct parameters: -#> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.371217033 0.003064156 1.789935045 0.724683005 0.301622307 1.754234135 +#> -0.371224133 0.003056179 1.789939402 0.724671158 0.301602977 1.754200729 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.358 -#> fixed effects: 93.82269 -5.456017 -0.6788969 -1.862197 -4.199677 0.05532978 +#> PNLS step: RSS = 630.3633 +#> fixed effects: 93.82269 -5.455992 -0.6788958 -1.862196 -4.199671 0.05532831 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 2.059533e-04 4.860085e-05+#> 4.789774e-07 2.200661e-05#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8541 884.6194 -408.9270 -#> f_nlme_fomc_sfo 2 11 818.5149 853.0087 -398.2575 1 vs 2 21.33913 <.0001 -#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4042 -533.5910 2 vs 3 270.66712 <.0001#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8541 884.6194 -408.927 -#> f_nlme_sfo_sfo 2 9 1085.1821 1113.4042 -533.591 1 vs 2 249.328 <.0001+#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 +#> f_nlme_fomc_sfo 2 11 818.5149 853.0087 -398.2575 1 vs 2 21.33975 <.0001 +#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66716 <.0001#> Model df AIC BIC logLik Test L.Ratio p-value +#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 +#> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 <.0001endpoints(f_nlme_sfo_sfo)#> $ff #> parent_sink parent_A1 A1_sink -#> 0.5912435 0.4087565 1.0000000 +#> 0.5912432 0.4087568 1.0000000 #> #> $distimes -#> DT50 DT90 -#> parent 19.13517 63.56565 -#> A1 66.02149 219.31865 +#> DT50 DT90 +#> parent 19.13518 63.5657 +#> A1 66.02155 219.3189 #>endpoints(f_nlme_dfop_sfo)#> $ff -#> parent_A1 parent_sink A1_sink -#> 0.2768571 0.7231429 1.0000000 +#> parent_A1 parent_sink +#> 0.2768574 0.7231426 #> #> $distimes -#> DT50 DT90 DT50_k1 DT50_k2 -#> parent 11.07092 104.6325 4.462389 46.2085 -#> A1 162.30937 539.1801 NA NA +#> DT50 DT90 DT50_k1 DT50_k2 +#> parent 11.07091 104.6320 4.462384 46.20825 +#> A1 162.30536 539.1667 NA NA #># }
R/plot.mmkin.R
plot.mmkin.Rd
# S3 method for mmkin
-plot(
+plot(
x,
main = "auto",
legends = 1,
@@ -185,7 +193,7 @@ values, with the error model, using mkinerrplot
standardized
Should the residuals be standardized? This option
is passed to mkinresplot
, it only takes effect if
-`resplot = "time"`.
+resplot = "time"
.
R/plot.nlme.mmkin.R
plot.nlme.mmkin.Rd
# S3 method for nlme.mmkin
-plot(
+plot(
x,
i = 1:ncol(x$mmkin_orig),
main = "auto",
@@ -183,7 +191,7 @@ values, with the error model, using mkinerrplot
standardized
Should the residuals be standardized? This option
is passed to mkinresplot
, it only takes effect if
-`resplot = "time"`.
+resplot = "time"
.
Werner, Mario, Brooks, Samuel H., and Knott, Lancaster B. (1978) - Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry - 24(11), 1895-1898.
+Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry +24(11), 1895-1898.Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for - measurement error in analytical chemistry. Technometrics 37(2), 176-184.
+measurement error in analytical chemistry. Technometrics 37(2), 176-184.The summary function returns a list with components, among others
The mkin and R versions used
The dates where the fit and the summary were - produced
The differential equations used in the model
Was maximum or minimum use made of formation fractions
Optimised and backtransformed - parameters
The data (see Description above).
The starting values and bounds, if applicable, for optimised - parameters.
The values of fixed parameters.
The chi2 error levels for - each observed variable.
All backtransformed ODE - parameters, for use as starting parameters for related models.
Error model parameters.
The estimated formation fractions derived from the fitted - model.
The DT50 and DT90 values for each observed variable.
If applicable, eigenvalues of SFORB components of the model.
The dates where the fit and the summary were +produced
The differential equations used in the model
Was maximum or minimum use made of formation fractions
Optimised and backtransformed +parameters
The data (see Description above).
The starting values and bounds, if applicable, for optimised +parameters.
The values of fixed parameters.
The chi2 error levels for +each observed variable.
All backtransformed ODE +parameters, for use as starting parameters for related models.
Error model parameters.
The estimated formation fractions derived from the fitted +model.
The DT50 and DT90 values for each observed variable.
If applicable, eigenvalues of SFORB components of the model.
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
+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#> mkin version used for fitting: 0.9.49.9 -#> R version used for fitting: 3.6.3 -#> Date of fit: Mon Mar 30 21:43:00 2020 -#> Date of summary: Mon Mar 30 21:43:00 2020 + summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))#> mkin version used for fitting: 0.9.50.1 +#> R version used for fitting: 4.0.0 +#> Date of fit: Tue May 12 08:07:03 2020 +#> Date of summary: Tue May 12 08:07:03 2020 #> #> Equations: -#> d_parent/dt = - k_parent_sink * parent +#> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.306 s +#> Fitted using 131 model solutions performed in 0.026 s #> #> Error model: Constant variance #> #> Error model algorithm: OLS #> #> Starting values for parameters to be optimised: -#> value type -#> parent_0 101.24 state -#> k_parent_sink 0.10 deparm +#> value type +#> parent_0 101.24 state +#> k_parent 0.10 deparm #> #> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 101.240000 -Inf Inf -#> log_k_parent_sink -2.302585 -Inf Inf +#> value lower upper +#> parent_0 101.240000 -Inf Inf +#> log_k_parent -2.302585 -Inf Inf #> #> Fixed parameter values: #> None #> +#> Results: +#> +#> AIC BIC logLik +#> 55.28197 55.5203 -24.64099 +#> #> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 109.200 3.70400 99.630 118.700 -#> log_k_parent_sink -3.291 0.09176 -3.527 -3.055 -#> sigma 5.266 1.31600 1.882 8.649 +#> Estimate Std. Error Lower Upper +#> parent_0 109.200 3.70400 99.630 118.700 +#> log_k_parent -3.291 0.09176 -3.527 -3.055 +#> sigma 5.266 1.31600 1.882 8.649 #> #> Parameter correlation: -#> parent_0 log_k_parent_sink sigma -#> parent_0 1.000e+00 5.428e-01 1.642e-07 -#> log_k_parent_sink 5.428e-01 1.000e+00 2.507e-07 -#> sigma 1.642e-07 2.507e-07 1.000e+00 +#> parent_0 log_k_parent sigma +#> parent_0 1.000e+00 5.428e-01 1.642e-07 +#> log_k_parent 5.428e-01 1.000e+00 2.507e-07 +#> sigma 1.642e-07 2.507e-07 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 109.20000 29.47 4.218e-07 99.6300 118.70000 -#> k_parent_sink 0.03722 10.90 5.650e-05 0.0294 0.04712 -#> sigma 5.26600 4.00 5.162e-03 1.8820 8.64900 +#> Estimate t value Pr(>t) Lower Upper +#> parent_0 109.20000 29.47 4.218e-07 99.6300 118.70000 +#> k_parent 0.03722 10.90 5.650e-05 0.0294 0.04712 +#> sigma 5.26600 4.00 5.162e-03 1.8820 8.64900 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df #> All data 8.385 2 6 #> parent 8.385 2 6 #> -#> Resulting formation fractions: -#> ff -#> parent_sink 1 -#> #> Estimated disappearance times: #> DT50 DT90 #> parent 18.62 61.87 @@ -296,17 +305,10 @@ distribution #> 118 parent 0.39 1.351 -0.9613
R/transform_odeparms.R
transform_odeparms.Rd
A vector of transformed or backtransformed parameters with the same - names as the original parameters.
+names as the original parameters.The transformation of sets of formation fractions is fragile, as it supposes
@@ -224,39 +232,28 @@ This is no problem for the internal use in mkinfit<
m1 = list(type = "SFO"))
mkinfit<
mkinfit<
diff --git a/dumpdata.R b/dumpdata.R
new file mode 100644
index 00000000..881df526
--- /dev/null
+++ b/dumpdata.R
@@ -0,0 +1,7 @@
+mkinpredict <-
+function (x, odeparms, odeini, outtimes = seq(0, 120, by = 0.10000000000000001),
+ solution_type = "deSolve", use_compiled = "auto", method.ode = "lsoda",
+ atol = 1e-08, rtol = 1e-10, map_output = TRUE, ...)
+{
+ UseMethod("mkinpredict", x)
+}
diff --git a/man/AIC.mmkin.Rd b/man/AIC.mmkin.Rd
index a10d0aeb..13081561 100644
--- a/man/AIC.mmkin.Rd
+++ b/man/AIC.mmkin.Rd
@@ -19,7 +19,7 @@ column.}
}
\value{
As in the generic method (a numeric value for single fits, or a
- dataframe if there are several fits in the column).
+dataframe if there are several fits in the column).
}
\description{
Provides a convenient way to compare different kinetic models fitted to the
diff --git a/man/DFOP.solution.Rd b/man/DFOP.solution.Rd
index 8ada60c5..d8c4553e 100644
--- a/man/DFOP.solution.Rd
+++ b/man/DFOP.solution.Rd
@@ -32,15 +32,15 @@ two exponential decline functions.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\seealso{
Other parent solutions:
diff --git a/man/FOMC.solution.Rd b/man/FOMC.solution.Rd
index e5e46c87..eeee85f9 100644
--- a/man/FOMC.solution.Rd
+++ b/man/FOMC.solution.Rd
@@ -30,8 +30,8 @@ in the original equation.
}
\note{
The solution of the FOMC kinetic model reduces to the
- \code{\link{SFO.solution}} for large values of \code{alpha} and
- \code{beta} with \eqn{k = \frac{\beta}{\alpha}}{k = beta/alpha}.
+\code{\link{SFO.solution}} for large values of \code{alpha} and
+\code{beta} with \eqn{k = \frac{\beta}{\alpha}}{k = beta/alpha}.
}
\examples{
@@ -40,20 +40,20 @@ The solution of the FOMC kinetic model reduces to the
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
- Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil:
- A new model based on spatial variability. \emph{Environmental Science and
- Technology} \bold{24}, 1032-1038
+Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil:
+A new model based on spatial variability. \emph{Environmental Science and
+Technology} \bold{24}, 1032-1038
}
\seealso{
Other parent solutions:
diff --git a/man/HS.solution.Rd b/man/HS.solution.Rd
index f72df23b..2940e949 100644
--- a/man/HS.solution.Rd
+++ b/man/HS.solution.Rd
@@ -33,15 +33,15 @@ between them.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\seealso{
Other parent solutions:
diff --git a/man/IORE.solution.Rd b/man/IORE.solution.Rd
index e1f1be1a..1150f023 100644
--- a/man/IORE.solution.Rd
+++ b/man/IORE.solution.Rd
@@ -25,9 +25,9 @@ a concentration dependent rate constant.
}
\note{
The solution of the IORE kinetic model reduces to the
- \code{\link{SFO.solution}} if N = 1. The parameters of the IORE model can
- be transformed to equivalent parameters of the FOMC mode - see the NAFTA
- guidance for details.
+\code{\link{SFO.solution}} if N = 1. The parameters of the IORE model can
+be transformed to equivalent parameters of the FOMC mode - see the NAFTA
+guidance for details.
}
\examples{
@@ -46,7 +46,7 @@ The solution of the IORE kinetic model reduces to the
}
\references{
NAFTA Technical Working Group on Pesticides (not dated) Guidance
- for Evaluating and Calculating Degradation Kinetics in Environmental Media
+for Evaluating and Calculating Degradation Kinetics in Environmental Media
}
\seealso{
Other parent solutions:
diff --git a/man/SFO.solution.Rd b/man/SFO.solution.Rd
index 6892cccc..c0aac237 100644
--- a/man/SFO.solution.Rd
+++ b/man/SFO.solution.Rd
@@ -26,15 +26,15 @@ Function describing exponential decline from a defined starting value.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\seealso{
Other parent solutions:
diff --git a/man/SFORB.solution.Rd b/man/SFORB.solution.Rd
index 98a8c684..dc78d1f1 100644
--- a/man/SFORB.solution.Rd
+++ b/man/SFORB.solution.Rd
@@ -20,7 +20,7 @@ fraction.}
}
\value{
The value of the response variable, which is the sum of free and
- bound fractions at time \code{t}.
+bound fractions at time \code{t}.
}
\description{
Function describing the solution of the differential equations describing
@@ -36,15 +36,15 @@ and no substance in the bound fraction.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\seealso{
Other parent solutions:
diff --git a/man/add_err.Rd b/man/add_err.Rd
index 3452923e..1171e0fd 100644
--- a/man/add_err.Rd
+++ b/man/add_err.Rd
@@ -40,7 +40,7 @@ seed is not set.}
}
\value{
A list of datasets compatible with \code{\link{mmkin}}, i.e. the
- components of the list are datasets compatible with \code{\link{mkinfit}}.
+components of the list are datasets compatible with \code{\link{mkinfit}}.
}
\description{
Normally distributed errors are added to data predicted for a specific
diff --git a/man/confint.mkinfit.Rd b/man/confint.mkinfit.Rd
index 81d7a6e8..f295afc4 100644
--- a/man/confint.mkinfit.Rd
+++ b/man/confint.mkinfit.Rd
@@ -45,7 +45,7 @@ applied to the likelihood based on the transformed parameters?}
transformed parameters, should we backtransform the parameters with
their confidence intervals?}
-\item{cores}{The number of cores to be used for multicore processing.
+\item{cores}{The number of cores to be used for multicore processing.
On Windows machines, cores > 1 is currently not supported.}
\item{quiet}{Should we suppress the message "Profiling the likelihood"}
@@ -54,7 +54,7 @@ On Windows machines, cores > 1 is currently not supported.}
}
\value{
A matrix with columns giving lower and upper confidence limits for
- each parameter.
+each parameter.
}
\description{
The default method 'quadratic' is based on the quadratic approximation of
@@ -143,10 +143,10 @@ confint(f_tc_2, "parent_0", method = "quadratic")
\references{
Bates DM and Watts GW (1988) Nonlinear regression analysis & its applications
- Pawitan Y (2013) In all likelihood - Statistical modelling and
- inference using likelihood. Clarendon Press, Oxford.
+Pawitan Y (2013) In all likelihood - Statistical modelling and
+inference using likelihood. Clarendon Press, Oxford.
- Venzon DJ and Moolgavkar SH (1988) A Method for Computing
- Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
- 87–94.
+Venzon DJ and Moolgavkar SH (1988) A Method for Computing
+Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
+87–94.
}
diff --git a/man/endpoints.Rd b/man/endpoints.Rd
index 26b5ee08..49f44d74 100644
--- a/man/endpoints.Rd
+++ b/man/endpoints.Rd
@@ -13,9 +13,9 @@ endpoints(fit)
}
\value{
A list with a matrix of dissipation times named distimes,
- and, if applicable, a vector of formation fractions named ff
- and, if the SFORB model was in use, a vector of eigenvalues
- of these SFORB models, equivalent to DFOP rate constants
+and, if applicable, a vector of formation fractions named ff
+and, if the SFORB model was in use, a vector of eigenvalues
+of these SFORB models, equivalent to DFOP rate constants
}
\description{
This function calculates DT50 and DT90 values as well as formation fractions
diff --git a/man/get_deg_func.Rd b/man/get_deg_func.Rd
index 1d8a3de9..75743448 100644
--- a/man/get_deg_func.Rd
+++ b/man/get_deg_func.Rd
@@ -8,7 +8,7 @@ get_deg_func()
}
\value{
A function that was likely previously assigned from within
- nlme.mmkin
+nlme.mmkin
}
\description{
Retrieve a degradation function from the mmkin namespace
diff --git a/man/ilr.Rd b/man/ilr.Rd
index 0cbd7e2c..f691ec23 100644
--- a/man/ilr.Rd
+++ b/man/ilr.Rd
@@ -15,8 +15,8 @@ sensible for vectors with all elements being greater than zero.}
}
\value{
The result of the forward or backward transformation. The returned
- components always sum to 1 for the case of the inverse log-ratio
- transformation.
+components always sum to 1 for the case of the inverse log-ratio
+transformation.
}
\description{
This implementation is a special case of the class of isometric log-ratio
@@ -48,11 +48,11 @@ ilr(c(b[1:3], 1 - sum(b[1:3]))) # Gives c(0.1, 0.3, 0.5)
}
\references{
Peter Filzmoser, Karel Hron (2008) Outlier Detection for
- Compositional Data Using Robust Methods. Math Geosci 40 233-248
+Compositional Data Using Robust Methods. Math Geosci 40 233-248
}
\seealso{
Another implementation can be found in R package
- \code{robCompositions}.
+\code{robCompositions}.
}
\author{
René Lehmann and Johannes Ranke
diff --git a/man/logLik.mkinfit.Rd b/man/logLik.mkinfit.Rd
index 502fb4d7..637570e4 100644
--- a/man/logLik.mkinfit.Rd
+++ b/man/logLik.mkinfit.Rd
@@ -13,8 +13,8 @@
}
\value{
An object of class \code{\link{logLik}} with the number of estimated
- parameters (degradation model parameters plus variance model parameters)
- as attribute.
+parameters (degradation model parameters plus variance model parameters)
+as attribute.
}
\description{
This function returns the product of the likelihood densities of each
@@ -45,7 +45,7 @@ and the fitted error model parameters.
}
\seealso{
Compare the AIC of columns of \code{\link{mmkin}} objects using
- \code{\link{AIC.mmkin}}.
+\code{\link{AIC.mmkin}}.
}
\author{
Johannes Ranke
diff --git a/man/logistic.solution.Rd b/man/logistic.solution.Rd
index 33b3d44a..efa12e7a 100644
--- a/man/logistic.solution.Rd
+++ b/man/logistic.solution.Rd
@@ -26,7 +26,7 @@ an increasing rate constant, supposedly caused by microbial growth
}
\note{
The solution of the logistic model reduces to the
- \code{\link{SFO.solution}} if \code{k0} is equal to \code{kmax}.
+\code{\link{SFO.solution}} if \code{k0} is equal to \code{kmax}.
}
\examples{
@@ -67,15 +67,15 @@ The solution of the logistic model reduces to the
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
FOCUS (2014) \dQuote{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
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\seealso{
Other parent solutions:
diff --git a/man/max_twa_parent.Rd b/man/max_twa_parent.Rd
index 7c9f4861..107eebd0 100644
--- a/man/max_twa_parent.Rd
+++ b/man/max_twa_parent.Rd
@@ -48,8 +48,8 @@ factor (f_twa) is calculated.}
}
\value{
For \code{max_twa_parent}, a numeric vector, named using the
- \code{windows} argument. For the other functions, a numeric vector of
- length one (also known as 'a number').
+\code{windows} argument. For the other functions, a numeric vector of
+length one (also known as 'a number').
}
\description{
This function calculates maximum moving window time weighted average
@@ -66,10 +66,10 @@ soil section of the FOCUS guidance.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\author{
Johannes Ranke
diff --git a/man/mkinerrplot.Rd b/man/mkinerrplot.Rd
index 9564ec19..82178aa9 100644
--- a/man/mkinerrplot.Rd
+++ b/man/mkinerrplot.Rd
@@ -50,7 +50,7 @@ be passed on to \code{\link{legend}}.}
}
\value{
Nothing is returned by this function, as it is called for its side
- effect, namely to produce a plot.
+effect, namely to produce a plot.
}
\description{
This function plots the squared residuals for the specified subset of the
@@ -70,7 +70,7 @@ mkinerrplot(fit)
}
\seealso{
\code{\link{mkinplot}}, for a way to plot the data and the fitted
- lines of the mkinfit object.
+lines of the mkinfit object.
}
\author{
Johannes Ranke
diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd
index db3f5f3e..97dffef7 100644
--- a/man/mkinfit.Rd
+++ b/man/mkinfit.Rd
@@ -3,10 +3,6 @@
\name{mkinfit}
\alias{mkinfit}
\title{Fit a kinetic model to data with one or more state variables}
-\source{
-Rocke, David M. und Lorenzato, Stefan (1995) A two-component model
- for measurement error in analytical chemistry. Technometrics 37(2), 176-184.
-}
\usage{
mkinfit(
mkinmod,
@@ -53,16 +49,16 @@ not observed in degradation data, because there is a lower limit of
detection.}
\item{parms.ini}{A named vector of initial values for the parameters,
- including parameters to be optimised and potentially also fixed parameters
- as indicated by \code{fixed_parms}. If set to "auto", initial values for
- rate constants are set to default values. Using parameter names that are
- not in the model gives an error.
+including parameters to be optimised and potentially also fixed parameters
+as indicated by \code{fixed_parms}. If set to "auto", initial values for
+rate constants are set to default values. Using parameter names that are
+not in the model gives an error.
- It is possible to only specify a subset of the parameters that the model
- needs. You can use the parameter lists "bparms.ode" from a previously
- fitted model, which contains the differential equation parameters from
- this model. This works nicely if the models are nested. An example is
- given below.}
+It is possible to only specify a subset of the parameters that the model
+needs. You can use the parameter lists "bparms.ode" from a previously
+fitted model, which contains the differential equation parameters from
+this model. This works nicely if the models are nested. An example is
+given below.}
\item{state.ini}{A named vector of initial values for the state variables of
the model. In case the observed variables are represented by more than one
@@ -141,48 +137,50 @@ is 1e-8, lower than in \code{\link{lsoda}}.}
is 1e-10, much lower than in \code{\link{lsoda}}.}
\item{error_model}{If the error model is "const", a constant standard
- deviation is assumed.
+deviation is assumed.
- If the error model is "obs", each observed variable is assumed to have its
- own variance.
+If the error model is "obs", each observed variable is assumed to have its
+own variance.
- If the error model is "tc" (two-component error model), a two component
- error model similar to the one described by Rocke and Lorenzato (1995) is
- used for setting up the likelihood function. Note that this model
- deviates from the model by Rocke and Lorenzato, as their model implies
- that the errors follow a lognormal distribution for large values, not a
- normal distribution as assumed by this method.}
+If the error model is "tc" (two-component error model), a two component
+error model similar to the one described by Rocke and Lorenzato (1995) is
+used for setting up the likelihood function. Note that this model
+deviates from the model by Rocke and Lorenzato, as their model implies
+that the errors follow a lognormal distribution for large values, not a
+normal distribution as assumed by this method.}
\item{error_model_algorithm}{If "auto", the selected algorithm depends on
- the error model. If the error model is "const", unweighted nonlinear
- least squares fitting ("OLS") is selected. If the error model is "obs", or
- "tc", the "d_3" algorithm is selected.
-
- The algorithm "d_3" will directly minimize the negative log-likelihood and
- - independently - also use the three step algorithm described below. The
- fit with the higher likelihood is returned.
+the error model. If the error model is "const", unweighted nonlinear
+least squares fitting ("OLS") is selected. If the error model is "obs", or
+"tc", the "d_3" algorithm is selected.
+
+The algorithm "d_3" will directly minimize the negative log-likelihood and
+\itemize{
+\item independently - also use the three step algorithm described below. The
+fit with the higher likelihood is returned.
+}
- The algorithm "direct" will directly minimize the negative log-likelihood.
+The algorithm "direct" will directly minimize the negative log-likelihood.
- The algorithm "twostep" will minimize the negative log-likelihood after an
- initial unweighted least squares optimisation step.
+The algorithm "twostep" will minimize the negative log-likelihood after an
+initial unweighted least squares optimisation step.
- The algorithm "threestep" starts with unweighted least squares, then
- optimizes only the error model using the degradation model parameters
- found, and then minimizes the negative log-likelihood with free
- degradation and error model parameters.
+The algorithm "threestep" starts with unweighted least squares, then
+optimizes only the error model using the degradation model parameters
+found, and then minimizes the negative log-likelihood with free
+degradation and error model parameters.
- The algorithm "fourstep" starts with unweighted least squares, then
- optimizes only the error model using the degradation model parameters
- found, then optimizes the degradation model again with fixed error model
- parameters, and finally minimizes the negative log-likelihood with free
- degradation and error model parameters.
+The algorithm "fourstep" starts with unweighted least squares, then
+optimizes only the error model using the degradation model parameters
+found, then optimizes the degradation model again with fixed error model
+parameters, and finally minimizes the negative log-likelihood with free
+degradation and error model parameters.
- The algorithm "IRLS" (Iteratively Reweighted Least Squares) starts with
- unweighted least squares, and then iterates optimization of the error
- model parameters and subsequent optimization of the degradation model
- using those error model parameters, until the error model parameters
- converge.}
+The algorithm "IRLS" (Iteratively Reweighted Least Squares) starts with
+unweighted least squares, and then iterates optimization of the error
+model parameters and subsequent optimization of the degradation model
+using those error model parameters, until the error model parameters
+converge.}
\item{reweight.tol}{Tolerance for the convergence criterion calculated from
the error model parameters in IRLS fits.}
@@ -196,7 +194,7 @@ the error model parameters in IRLS fits.}
}
\value{
A list with "mkinfit" in the class attribute. A summary can be
- obtained by \code{\link{summary.mkinfit}}.
+obtained by \code{\link{summary.mkinfit}}.
}
\description{
This function maximises the likelihood of the observed data using the Port
@@ -214,9 +212,9 @@ estimators.
}
\note{
When using the "IORE" submodel for metabolites, fitting with
- "transform_rates = TRUE" (the default) often leads to failures of the
- numerical ODE solver. In this situation it may help to switch off the
- internal rate transformation.
+"transform_rates = TRUE" (the default) often leads to failures of the
+numerical ODE solver. In this situation it may help to switch off the
+internal rate transformation.
}
\examples{
@@ -268,7 +266,7 @@ fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.o
}
\dontrun{
-# Weighted fits, including IRLS
+# Weighted fits, including IRLS (error_model = "obs")
SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"),
m1 = mkinsub("SFO"), use_of_ff = "max")
f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)
@@ -280,16 +278,24 @@ summary(f.tc)
}
+}
+\references{
+Rocke DM and Lorenzato S (1995) A two-component model
+for measurement error in analytical chemistry. \emph{Technometrics} 37(2), 176-184.
+
+Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical
+Degradation Data. \emph{Environments} 6(12) 124
+\href{https://doi.org/10.3390/environments6120124}{doi:10.3390/environments6120124}.
}
\seealso{
Plotting methods \code{\link{plot.mkinfit}} and
- \code{\link{mkinparplot}}.
+\code{\link{mkinparplot}}.
- Comparisons of models fitted to the same data can be made using
- \code{\link{AIC}} by virtue of the method \code{\link{logLik.mkinfit}}.
+Comparisons of models fitted to the same data can be made using
+\code{\link{AIC}} by virtue of the method \code{\link{logLik.mkinfit}}.
- Fitting of several models to several datasets in a single call to
- \code{\link{mmkin}}.
+Fitting of several models to several datasets in a single call to
+\code{\link{mmkin}}.
}
\author{
Johannes Ranke
diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd
index a5736be7..6a6d2027 100644
--- a/man/mkinmod.Rd
+++ b/man/mkinmod.Rd
@@ -44,25 +44,30 @@ applicable to give detailed information about the C function being built.}
}
\value{
A list of class \code{mkinmod} for use with \code{\link{mkinfit}},
- containing, among others,
- \item{diffs}{
- A vector of string representations of differential equations, one for
- each modelling variable.
- }
- \item{map}{
- A list containing named character vectors for each observed variable,
- specifying the modelling variables by which it is represented.
- }
- \item{use_of_ff}{
- The content of \code{use_of_ff} is passed on in this list component.
- }
- \item{coefmat}{
- The coefficient matrix, if the system of differential equations can be
- represented by one.
- }
- \item{cf}{
- If generated, the compiled function as returned by cfunction.
- }
+containing, among others,
+\item{diffs}{
+A vector of string representations of differential equations, one for
+each modelling variable.
+}
+\item{map}{
+A list containing named character vectors for each observed variable,
+specifying the modelling variables by which it is represented.
+}
+\item{use_of_ff}{
+The content of \code{use_of_ff} is passed on in this list component.
+}
+\item{deg_func}{
+If generated, a function containing the solution of the degradation
+model.
+}
+\item{coefmat}{
+The coefficient matrix, if the system of differential equations can be
+represented by one.
+}
+\item{cf}{
+If generated, a compiled function calculating the derivatives as
+returned by cfunction.
+}
}
\description{
The function usually takes several expressions, each assigning a compound
@@ -76,8 +81,8 @@ in the FOCUS and NAFTA guidance documents are used.
}
\note{
The IORE submodel is not well tested for metabolites. When using this
- model for metabolites, you may want to read the second note in the help
- page to \code{\link{mkinfit}}.
+model for metabolites, you may want to read the second note in the help
+page to \code{\link{mkinfit}}.
}
\examples{
@@ -115,13 +120,13 @@ fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par,
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
- NAFTA Technical Working Group on Pesticides (not dated) Guidance for
- Evaluating and Calculating Degradation Kinetics in Environmental Media
+NAFTA Technical Working Group on Pesticides (not dated) Guidance for
+Evaluating and Calculating Degradation Kinetics in Environmental Media
}
\author{
Johannes Ranke
diff --git a/man/mkinparplot.Rd b/man/mkinparplot.Rd
index 975a0203..07b25009 100644
--- a/man/mkinparplot.Rd
+++ b/man/mkinparplot.Rd
@@ -11,7 +11,7 @@ mkinparplot(object)
}
\value{
Nothing is returned by this function, as it is called for its side
- effect, namely to produce a plot.
+effect, namely to produce a plot.
}
\description{
This function plots the confidence intervals for the parameters fitted using
diff --git a/man/mkinresplot.Rd b/man/mkinresplot.Rd
index 2a8b2d41..498d914d 100644
--- a/man/mkinresplot.Rd
+++ b/man/mkinresplot.Rd
@@ -54,7 +54,7 @@ be passed on to \code{\link{legend}}.}
}
\value{
Nothing is returned by this function, as it is called for its side
- effect, namely to produce a plot.
+effect, namely to produce a plot.
}
\description{
This function plots the residuals for the specified subset of the observed
@@ -71,8 +71,8 @@ mkinresplot(fit, "m1")
}
\seealso{
\code{\link{mkinplot}}, for a way to plot the data and the fitted
- lines of the mkinfit object, and \code{\link{plot_res}} for a function
- combining the plot of the fit and the residual plot.
+lines of the mkinfit object, and \code{\link{plot_res}} for a function
+combining the plot of the fit and the residual plot.
}
\author{
Johannes Ranke
diff --git a/man/mmkin.Rd b/man/mmkin.Rd
index 99895400..eda0d837 100644
--- a/man/mmkin.Rd
+++ b/man/mmkin.Rd
@@ -33,8 +33,8 @@ for parallel execution.}
}
\value{
A two-dimensional \code{\link{array}} of \code{\link{mkinfit}}
- objects that can be indexed using the model names for the first index (row index)
- and the dataset names for the second index (column index).
+objects that can be indexed using the model names for the first index (row index)
+and the dataset names for the second index (column index).
}
\description{
This function calls \code{\link{mkinfit}} on all combinations of models and
@@ -79,7 +79,7 @@ plot(fits.0[1, 1])
}
\seealso{
\code{\link{[.mmkin}} for subsetting, \code{\link{plot.mmkin}} for
- plotting.
+plotting.
}
\author{
Johannes Ranke
diff --git a/man/nafta.Rd b/man/nafta.Rd
index 49c13afc..4f05324b 100644
--- a/man/nafta.Rd
+++ b/man/nafta.Rd
@@ -6,15 +6,15 @@
\title{Evaluate parent kinetics using the NAFTA guidance}
\source{
NAFTA (2011) Guidance for evaluating and calculating degradation
- kinetics in environmental media. NAFTA Technical Working Group on
- Pesticides
- \url{https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation}
- accessed 2019-02-22
+kinetics in environmental media. NAFTA Technical Working Group on
+Pesticides
+\url{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
- \url{https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance}
+US EPA (2015) Standard Operating Procedure for Using the NAFTA Guidance to
+Calculate Representative Half-life Values and Characterizing Pesticide
+Degradation
+\url{https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance}
}
\usage{
nafta(ds, title = NA, quiet = FALSE, ...)
@@ -41,9 +41,9 @@ dissipation times.}
}
\value{
An list of class \code{nafta}. The list element named "mmkin" is the
- \code{\link{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.
+\code{\link{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.
}
\description{
The function fits the SFO, IORE and DFOP models using \code{\link{mmkin}}
diff --git a/man/nlme.Rd b/man/nlme.Rd
index a9e368dd..bf527320 100644
--- a/man/nlme.Rd
+++ b/man/nlme.Rd
@@ -21,9 +21,9 @@ nlme_data(object)
A function that can be used with nlme
If random is FALSE (default), a named vector containing mean values
- of the fitted degradation model parameters. If random is TRUE, a list with
- fixed and random effects, in the format required by the start argument of
- nlme for the case of a single grouping variable ds?
+of the fitted degradation model parameters. If random is TRUE, a list with
+fixed and random effects, in the format required by the start argument of
+nlme for the case of a single grouping variable ds?
A \code{\link{groupedData}} object
}
diff --git a/man/nlme.mmkin.Rd b/man/nlme.mmkin.Rd
index 430dbda1..ae2b2d22 100644
--- a/man/nlme.mmkin.Rd
+++ b/man/nlme.mmkin.Rd
@@ -67,7 +67,7 @@ parameters taken from the mmkin object are used}
}
\value{
Upon success, a fitted nlme.mmkin object, which is an nlme object
- with additional elements
+with additional elements
}
\description{
This functions sets up a nonlinear mixed effects model for an mmkin row
diff --git a/man/plot.mkinfit.Rd b/man/plot.mkinfit.Rd
index 4235557e..bf38c5a5 100644
--- a/man/plot.mkinfit.Rd
+++ b/man/plot.mkinfit.Rd
@@ -85,7 +85,7 @@ fits is shown, the residual plot is in the lower third of the plot.
Otherwise, i.e. if "sep_obs" is given, the residual plots will be located
to the right of the plots of the fitted curves. If this is set to
'standardized', a plot of the residuals divided by the standard deviation
- given by the fitted error model will be shown.}
+given by the fitted error model will be shown.}
\item{show_errplot}{Should squared residuals and the error model be shown?
If only one plot of the fits is shown, this plot is in the lower third of
diff --git a/man/plot.mmkin.Rd b/man/plot.mmkin.Rd
index 600881ea..998e25e1 100644
--- a/man/plot.mmkin.Rd
+++ b/man/plot.mmkin.Rd
@@ -34,7 +34,7 @@ values, with the error model, using \code{\link{mkinerrplot}}.}
\item{standardized}{Should the residuals be standardized? This option
is passed to \code{\link{mkinresplot}}, it only takes effect if
-`resplot = "time"`.}
+\code{resplot = "time"}.}
\item{show_errmin}{Should the chi2 error level be shown on top of the plots
to the left?}
diff --git a/man/plot.nlme.mmkin.Rd b/man/plot.nlme.mmkin.Rd
index 9bea7013..91130402 100644
--- a/man/plot.nlme.mmkin.Rd
+++ b/man/plot.nlme.mmkin.Rd
@@ -36,7 +36,7 @@ values, with the error model, using \code{\link{mkinerrplot}}.}
\item{standardized}{Should the residuals be standardized? This option
is passed to \code{\link{mkinresplot}}, it only takes effect if
-`resplot = "time"`.}
+\code{resplot = "time"}.}
\item{show_errmin}{Should the chi2 error level be shown on top of the plots
to the left?}
diff --git a/man/sigma_twocomp.Rd b/man/sigma_twocomp.Rd
index 0004144f..4e1f7c38 100644
--- a/man/sigma_twocomp.Rd
+++ b/man/sigma_twocomp.Rd
@@ -33,9 +33,9 @@ y.
}
\references{
Werner, Mario, Brooks, Samuel H., and Knott, Lancaster B. (1978)
- Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry
- 24(11), 1895-1898.
+Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry
+24(11), 1895-1898.
- Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for
- measurement error in analytical chemistry. Technometrics 37(2), 176-184.
+Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for
+measurement error in analytical chemistry. Technometrics 37(2), 176-184.
}
diff --git a/man/summary.mkinfit.Rd b/man/summary.mkinfit.Rd
index fabe31d0..24991d71 100644
--- a/man/summary.mkinfit.Rd
+++ b/man/summary.mkinfit.Rd
@@ -29,27 +29,27 @@ distribution}
}
\value{
The summary function returns a list with components, among others
- \item{version, Rversion}{The mkin and R versions used}
- \item{date.fit, date.summary}{The dates where the fit and the summary were
- produced}
- \item{diffs}{The differential equations used in the model}
- \item{use_of_ff}{Was maximum or minimum use made of formation fractions}
- \item{bpar}{Optimised and backtransformed
- parameters}
- \item{data}{The data (see Description above).}
- \item{start}{The starting values and bounds, if applicable, for optimised
- parameters.}
- \item{fixed}{The values of fixed parameters.}
- \item{errmin }{The chi2 error levels for
- each observed variable.}
- \item{bparms.ode}{All backtransformed ODE
- parameters, for use as starting parameters for related models.}
- \item{errparms}{Error model parameters.}
- \item{ff}{The estimated formation fractions derived from the fitted
- model.}
- \item{distimes}{The DT50 and DT90 values for each observed variable.}
- \item{SFORB}{If applicable, eigenvalues of SFORB components of the model.}
- The print method is called for its side effect, i.e. printing the summary.
+\item{version, Rversion}{The mkin and R versions used}
+\item{date.fit, date.summary}{The dates where the fit and the summary were
+produced}
+\item{diffs}{The differential equations used in the model}
+\item{use_of_ff}{Was maximum or minimum use made of formation fractions}
+\item{bpar}{Optimised and backtransformed
+parameters}
+\item{data}{The data (see Description above).}
+\item{start}{The starting values and bounds, if applicable, for optimised
+parameters.}
+\item{fixed}{The values of fixed parameters.}
+\item{errmin }{The chi2 error levels for
+each observed variable.}
+\item{bparms.ode}{All backtransformed ODE
+parameters, for use as starting parameters for related models.}
+\item{errparms}{Error model parameters.}
+\item{ff}{The estimated formation fractions derived from the fitted
+model.}
+\item{distimes}{The DT50 and DT90 values for each observed variable.}
+\item{SFORB}{If applicable, eigenvalues of SFORB components of the model.}
+The print method is called for its side effect, i.e. printing the summary.
}
\description{
Lists model equations, initial parameter values, optimised parameters with
@@ -65,10 +65,10 @@ values.
}
\references{
FOCUS (2006) \dQuote{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,
- \url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
+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,
+\url{http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics}
}
\author{
Johannes Ranke
diff --git a/man/transform_odeparms.Rd b/man/transform_odeparms.Rd
index 5257fe12..e250483a 100644
--- a/man/transform_odeparms.Rd
+++ b/man/transform_odeparms.Rd
@@ -48,7 +48,7 @@ fitting procedure.}
}
\value{
A vector of transformed or backtransformed parameters with the same
- names as the original parameters.
+names as the original parameters.
}
\description{
The transformations are intended to map parameters that should only take on
--
cgit v1.2.1