Laboratory Data L1

The following code defines example dataset L1 from the FOCUS kinetics report, p. 284:

library("mkin", quietly = TRUE)
FOCUS_2006_L1 = data.frame(
  t = rep(c(0, 1, 2, 3, 5, 7, 14, 21, 30), each = 2),
  parent = c(88.3, 91.4, 85.6, 84.5, 78.9, 77.6, 
             72.0, 71.9, 50.3, 59.4, 47.0, 45.1,
             27.7, 27.3, 10.0, 10.4, 2.9, 4.0))
FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1)

Here we use the assumptions of simple first order (SFO), the case of declining rate constant over time (FOMC) and the case of two different phases of the kinetics (DFOP). For a more detailed discussion of the models, please see the FOCUS kinetics report.

Since mkin version 0.9-32 (July 2014), we can use shorthand notation like "SFO" for parent only degradation models. The following two lines fit the model and produce the summary report of the model fit. This covers the numerical analysis given in the FOCUS report.

m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet = TRUE)
summary(m.L1.SFO)
## mkin version:    0.9.44 
## R version:       3.3.1 
## Date of fit:     Tue Jun 28 10:30:10 2016 
## Date of summary: Tue Jun 28 10:30:10 2016 
## 
## Equations:
## d_parent = - k_parent_sink * parent
## 
## Model predictions using solution type analytical 
## 
## Fitted with method Port using 37 model solutions performed in 0.249 s
## 
## Weighting: none
## 
## Starting values for parameters to be optimised:
##               value   type
## parent_0      89.85  state
## k_parent_sink  0.10 deparm
## 
## Starting values for the transformed parameters actually optimised:
##                       value lower upper
## parent_0          89.850000  -Inf   Inf
## log_k_parent_sink -2.302585  -Inf   Inf
## 
## Fixed parameter values:
## None
## 
## Optimised, transformed parameters with symmetric confidence intervals:
##                   Estimate Std. Error  Lower  Upper
## parent_0            92.470    1.36800 89.570 95.370
## log_k_parent_sink   -2.347    0.04057 -2.433 -2.261
## 
## Parameter correlation:
##                   parent_0 log_k_parent_sink
## parent_0            1.0000            0.6248
## log_k_parent_sink   0.6248            1.0000
## 
## Residual standard error: 2.948 on 16 degrees of freedom
## 
## 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      92.47000   67.58 2.170e-21 89.57000 95.3700
## k_parent_sink  0.09561   24.65 1.867e-14  0.08773  0.1042
## 
## Chi2 error levels in percent:
##          err.min n.optim df
## All data   3.424       2  7
## parent     3.424       2  7
## 
## Resulting formation fractions:
##             ff
## parent_sink  1
## 
## Estimated disappearance times:
##         DT50  DT90
## parent 7.249 24.08
## 
## Data:
##  time variable observed predicted residual
##     0   parent     88.3    92.471  -4.1710
##     0   parent     91.4    92.471  -1.0710
##     1   parent     85.6    84.039   1.5610
##     1   parent     84.5    84.039   0.4610
##     2   parent     78.9    76.376   2.5241
##     2   parent     77.6    76.376   1.2241
##     3   parent     72.0    69.412   2.5884
##     3   parent     71.9    69.412   2.4884
##     5   parent     50.3    57.330  -7.0301
##     5   parent     59.4    57.330   2.0699
##     7   parent     47.0    47.352  -0.3515
##     7   parent     45.1    47.352  -2.2515
##    14   parent     27.7    24.247   3.4528
##    14   parent     27.3    24.247   3.0528
##    21   parent     10.0    12.416  -2.4163
##    21   parent     10.4    12.416  -2.0163
##    30   parent      2.9     5.251  -2.3513
##    30   parent      4.0     5.251  -1.2513

A plot of the fit is obtained with the plot function for mkinfit objects.

plot(m.L1.SFO, show_errmin = TRUE, main = "FOCUS L1 - SFO")

The residual plot can be easily obtained by

mkinresplot(m.L1.SFO, ylab = "Observed", xlab = "Time")

For comparison, the FOMC model is fitted as well, and the χ2 error level is checked.

m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation by method Port did not converge.
## Convergence code is 1
plot(m.L1.FOMC, show_errmin = TRUE, main = "FOCUS L1 - FOMC")

summary(m.L1.FOMC, data = FALSE)
## mkin version:    0.9.44 
## R version:       3.3.1 
## Date of fit:     Tue Jun 28 10:30:12 2016 
## Date of summary: Tue Jun 28 10:30:12 2016 
## 
## 
## Warning: Optimisation by method Port did not converge.
## Convergence code is 1 
## 
## 
## Equations:
## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
## 
## Model predictions using solution type analytical 
## 
## Fitted with method Port using 188 model solutions performed in 1.227 s
## 
## Weighting: none
## 
## Starting values for parameters to be optimised:
##          value   type
## parent_0 89.85  state
## alpha     1.00 deparm
## beta     10.00 deparm
## 
## Starting values for the transformed parameters actually optimised:
##               value lower upper
## parent_0  89.850000  -Inf   Inf
## log_alpha  0.000000  -Inf   Inf
## log_beta   2.302585  -Inf   Inf
## 
## Fixed parameter values:
## None
## 
## Optimised, transformed parameters with symmetric confidence intervals:
##           Estimate Std. Error  Lower Upper
## parent_0     92.47      1.422  89.44 95.50
## log_alpha    15.43     15.080 -16.71 47.58
## log_beta     17.78     15.090 -14.37 49.93
## 
## Parameter correlation:
##           parent_0 log_alpha log_beta
## parent_0    1.0000    0.1129   0.1112
## log_alpha   0.1129    1.0000   1.0000
## log_beta    0.1112    1.0000   1.0000
## 
## Residual standard error: 3.045 on 15 degrees of freedom
## 
## 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 9.247e+01  65.150 4.044e-20 8.944e+01 9.550e+01
## alpha    5.044e+06   1.271 1.115e-01 5.510e-08 4.618e+20
## beta     5.276e+07   1.259 1.137e-01 5.732e-07 4.857e+21
## 
## Chi2 error levels in percent:
##          err.min n.optim df
## All data   3.619       3  6
## parent     3.619       3  6
## 
## Estimated disappearance times:
##        DT50  DT90 DT50back
## parent 7.25 24.08     7.25

We get a warning that the default optimisation algorithm Port did not converge, which is an indication that the model is overparameterised, i.e. contains too many parameters that are ill-defined as a consequence.

And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the χ2 error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters log_alpha and log_beta internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of alpha and beta. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of log_alpha and log_beta is 1.000, clearly indicating that the model is overparameterised.

The χ2 error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same χ2 error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of χ2 error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt (Ranke).

Laboratory Data L2

The following code defines example dataset L2 from the FOCUS kinetics report, p. 287:

FOCUS_2006_L2 = data.frame(
  t = rep(c(0, 1, 3, 7, 14, 28), each = 2),
  parent = c(96.1, 91.8, 41.4, 38.7,
             19.3, 22.3, 4.6, 4.6,
             2.6, 1.2, 0.3, 0.6))
FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2)

SFO fit for L2

Again, the SFO model is fitted and the result is plotted. The residual plot can be obtained simply by adding the argument show_residuals to the plot command.

m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE)
plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE, 
     main = "FOCUS L2 - SFO")