From 65d31e345f9e61e9d05584b24df6a01c6c6ed18d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 15 Oct 2014 01:13:48 +0200 Subject: Switch to using the Port algorithm per default --- vignettes/FOCUS_L.html | 135 ++++++++++++++++++++++++++----------------------- vignettes/FOCUS_Z.pdf | Bin 220198 -> 220189 bytes 2 files changed, 73 insertions(+), 62 deletions(-) (limited to 'vignettes') diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index 60c5132a..82bbd2c7 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -244,15 +244,15 @@ summary(m.L1.SFO)
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:33 2014 
-## Date of summary: Tue Oct 14 22:03:33 2014 
+## Date of fit:     Wed Oct 15 00:58:15 2014 
+## Date of summary: Wed Oct 15 00:58:15 2014 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 14 model solutions performed in 0.081 s
+## Fitted with method Port using 37 model solutions performed in 0.203 s
 ## 
 ## Weighting: none
 ## 
@@ -272,7 +272,7 @@ summary(m.L1.SFO)
 ## Optimised, transformed parameters:
 ##                   Estimate Std. Error Lower Upper t value Pr(>|t|)
 ## parent_0             92.50     1.3700 89.60 95.40    67.6 4.34e-21
-## log_k_parent_sink    -2.35     0.0406 -2.43 -2.26   -57.9 5.16e-20
+## log_k_parent_sink    -2.35     0.0406 -2.43 -2.26   -57.9 5.15e-20
 ##                     Pr(>t)
 ## parent_0          2.17e-21
 ## log_k_parent_sink 2.58e-20
@@ -341,20 +341,31 @@ The residual plot can be easily obtained by

is checked.

m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
-summary(m.L1.FOMC, data = FALSE)
+
+ +
## Warning: Optimisation by method Port did not converge.
+## Convergence code is 1
+
+ +
summary(m.L1.FOMC, data = FALSE)
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:34 2014 
-## Date of summary: Tue Oct 14 22:03:34 2014 
+## Date of fit:     Wed Oct 15 00:58:16 2014 
+## Date of summary: Wed Oct 15 00:58:16 2014 
+## 
+## 
+## Warning: Optimisation by method Port did not converge.
+## Convergence code is 1 
+## 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 53 model solutions performed in 0.289 s
+## Fitted with method Port using 188 model solutions performed in 1.011 s
 ## 
 ## Weighting: none
 ## 
@@ -375,23 +386,23 @@ summary(m.L1.FOMC, data = FALSE)
 ## 
 ## Optimised, transformed parameters:
 ##           Estimate Std. Error Lower Upper t value Pr(>|t|)   Pr(>t)
-## parent_0      92.5       1.45 89.40  95.6   63.60 1.17e-19 5.85e-20
-## log_alpha     14.9      10.60 -7.75  37.5    1.40 1.82e-01 9.08e-02
-## log_beta      17.2      10.60 -5.38  39.8    1.62 1.25e-01 6.26e-02
+## parent_0      92.5       1.42  89.4  95.5   65.00 8.32e-20 4.16e-20
+## log_alpha     15.4      15.10 -16.7  47.6    1.02 3.22e-01 1.61e-01
+## log_beta      17.8      15.10 -14.4  49.9    1.18 2.57e-01 1.28e-01
 ## 
 ## Parameter correlation:
 ##           parent_0 log_alpha log_beta
-## parent_0     1.000      0.24    0.238
-## log_alpha    0.240      1.00    1.000
-## log_beta     0.238      1.00    1.000
+## parent_0     1.000     0.113    0.111
+## log_alpha    0.113     1.000    1.000
+## log_beta     0.111     1.000    1.000
 ## 
 ## Residual standard error: 3.05 on 15 degrees of freedom
 ## 
 ## Backtransformed parameters:
 ##          Estimate    Lower    Upper
-## parent_0 9.25e+01 8.94e+01 9.56e+01
-## alpha    2.85e+06 4.32e-04 1.88e+16
-## beta     2.98e+07 4.59e-03 1.93e+17
+## parent_0 9.25e+01 8.94e+01 9.55e+01
+## alpha    5.04e+06 5.51e-08 4.62e+20
+## beta     5.28e+07 5.73e-07 4.86e+21
 ## 
 ## Chi2 error levels in percent:
 ##          err.min n.optim df
@@ -440,15 +451,15 @@ summary(m.L2.SFO)
 
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:35 2014 
-## Date of summary: Tue Oct 14 22:03:35 2014 
+## Date of fit:     Wed Oct 15 00:58:17 2014 
+## Date of summary: Wed Oct 15 00:58:17 2014 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 29 model solutions performed in 0.154 s
+## Fitted with method Port using 41 model solutions performed in 0.22 s
 ## 
 ## Weighting: none
 ## 
@@ -500,10 +511,10 @@ summary(m.L2.SFO)
 ## 
 ## Data:
 ##  time variable observed predicted residual
-##     0   parent     96.1  9.15e+01    4.635
-##     0   parent     91.8  9.15e+01    0.335
-##     1   parent     41.4  4.71e+01   -5.740
-##     1   parent     38.7  4.71e+01   -8.440
+##     0   parent     96.1  9.15e+01    4.634
+##     0   parent     91.8  9.15e+01    0.334
+##     1   parent     41.4  4.71e+01   -5.739
+##     1   parent     38.7  4.71e+01   -8.439
 ##     3   parent     19.3  1.25e+01    6.779
 ##     3   parent     22.3  1.25e+01    9.779
 ##     7   parent      4.6  8.83e-01    3.717
@@ -522,7 +533,7 @@ plot(m.L2.SFO)
 mkinresplot(m.L2.SFO)
 
-

plot of chunk unnamed-chunk-9

+

plot of chunk unnamed-chunk-9

In the FOCUS kinetics report, it is stated that there is no apparent systematic error observed from the residual plot up to the measured DT90 (approximately at @@ -543,22 +554,22 @@ plot(m.L2.FOMC) mkinresplot(m.L2.FOMC)

-

plot of chunk unnamed-chunk-10

+

plot of chunk unnamed-chunk-10

summary(m.L2.FOMC, data = FALSE)
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:36 2014 
-## Date of summary: Tue Oct 14 22:03:36 2014 
+## Date of fit:     Wed Oct 15 00:58:17 2014 
+## Date of summary: Wed Oct 15 00:58:17 2014 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 35 model solutions performed in 0.192 s
+## Fitted with method Port using 81 model solutions performed in 0.438 s
 ## 
 ## Weighting: none
 ## 
@@ -617,7 +628,7 @@ experimental error has to be assumed in order to explain the data.

plot(m.L2.DFOP)
-

plot of chunk unnamed-chunk-11

+

plot of chunk unnamed-chunk-11

Here, the default starting parameters for the DFOP model obviously do not lead to a reasonable solution. Therefore the fit is repeated with different starting @@ -629,15 +640,15 @@ parameters.

plot(m.L2.DFOP)
-

plot of chunk unnamed-chunk-12

+

plot of chunk unnamed-chunk-12

summary(m.L2.DFOP, data = FALSE)
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:36 2014 
-## Date of summary: Tue Oct 14 22:03:36 2014 
+## Date of fit:     Wed Oct 15 00:58:21 2014 
+## Date of summary: Wed Oct 15 00:58:21 2014 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -646,7 +657,7 @@ plot(m.L2.DFOP)
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 43 model solutions performed in 0.24 s
+## Fitted with method Port using 336 model solutions performed in 1.844 s
 ## 
 ## Weighting: none
 ## 
@@ -669,8 +680,8 @@ plot(m.L2.DFOP)
 ## 
 ## Optimised, transformed parameters:
 ##          Estimate Std. Error Lower Upper t value Pr(>|t|) Pr(>t)
-## parent_0   94.000         NA    NA    NA      NA       NA     NA
-## log_k1      6.160         NA    NA    NA      NA       NA     NA
+## parent_0   93.900         NA    NA    NA      NA       NA     NA
+## log_k1      3.120         NA    NA    NA      NA       NA     NA
 ## log_k2     -1.090         NA    NA    NA      NA       NA     NA
 ## g_ilr      -0.282         NA    NA    NA      NA       NA     NA
 ## 
@@ -681,8 +692,8 @@ plot(m.L2.DFOP)
 ## 
 ## Backtransformed parameters:
 ##          Estimate Lower Upper
-## parent_0   94.000    NA    NA
-## k1        476.000    NA    NA
+## parent_0   93.900    NA    NA
+## k1         22.700    NA    NA
 ## k2          0.337    NA    NA
 ## g           0.402    NA    NA
 ## 
@@ -693,7 +704,7 @@ plot(m.L2.DFOP)
 ## 
 ## Estimated disappearance times:
 ##        DT50 DT90 DT50_k1 DT50_k2
-## parent   NA   NA 0.00146    2.06
+## parent   NA   NA  0.0306    2.06
 

Here, the DFOP model is clearly the best-fit model for dataset L2 based on the @@ -718,22 +729,22 @@ FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3) plot(m.L3.SFO) -

plot of chunk unnamed-chunk-14

+

plot of chunk unnamed-chunk-14

summary(m.L3.SFO)
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:37 2014 
-## Date of summary: Tue Oct 14 22:03:37 2014 
+## Date of fit:     Wed Oct 15 00:58:22 2014 
+## Date of summary: Wed Oct 15 00:58:22 2014 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 44 model solutions performed in 0.237 s
+## Fitted with method Port using 43 model solutions performed in 0.232 s
 ## 
 ## Weighting: none
 ## 
@@ -785,14 +796,14 @@ plot(m.L3.SFO)
 ## 
 ## Data:
 ##  time variable observed predicted residual
-##     0   parent     97.8     74.87  22.9274
-##     3   parent     60.0     69.41  -9.4065
+##     0   parent     97.8     74.87  22.9281
+##     3   parent     60.0     69.41  -9.4061
 ##     7   parent     51.0     62.73 -11.7340
-##    14   parent     43.0     52.56  -9.5634
-##    30   parent     35.0     35.08  -0.0828
-##    60   parent     22.0     16.44   5.5614
-##    91   parent     15.0      7.51   7.4896
-##   120   parent     12.0      3.61   8.3908
+##    14   parent     43.0     52.56  -9.5638
+##    30   parent     35.0     35.08  -0.0839
+##    60   parent     22.0     16.44   5.5602
+##    91   parent     15.0      7.51   7.4887
+##   120   parent     12.0      3.61   8.3903
 

The chi2 error level of 21% as well as the plot suggest that the model @@ -811,15 +822,15 @@ plot(m.L3.FOMC)

## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:37 2014 
-## Date of summary: Tue Oct 14 22:03:37 2014 
+## Date of fit:     Wed Oct 15 00:58:22 2014 
+## Date of summary: Wed Oct 15 00:58:22 2014 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 26 model solutions performed in 0.139 s
+## Fitted with method Port using 83 model solutions performed in 0.442 s
 ## 
 ## Weighting: none
 ## 
@@ -884,8 +895,8 @@ plot(m.L3.DFOP)
 
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:37 2014 
-## Date of summary: Tue Oct 14 22:03:37 2014 
+## Date of fit:     Wed Oct 15 00:58:23 2014 
+## Date of summary: Wed Oct 15 00:58:23 2014 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -894,7 +905,7 @@ plot(m.L3.DFOP)
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 37 model solutions performed in 0.207 s
+## Fitted with method Port using 137 model solutions performed in 0.778 s
 ## 
 ## Weighting: none
 ## 
@@ -982,15 +993,15 @@ plot(m.L4.SFO)
 
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:38 2014 
-## Date of summary: Tue Oct 14 22:03:38 2014 
+## Date of fit:     Wed Oct 15 00:58:24 2014 
+## Date of summary: Wed Oct 15 00:58:24 2014 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 20 model solutions performed in 0.106 s
+## Fitted with method Port using 46 model solutions performed in 0.246 s
 ## 
 ## Weighting: none
 ## 
@@ -1057,15 +1068,15 @@ plot(m.L4.FOMC)
 
 
## mkin version:    0.9.34 
 ## R version:       3.1.1 
-## Date of fit:     Tue Oct 14 22:03:38 2014 
-## Date of summary: Tue Oct 14 22:03:38 2014 
+## Date of fit:     Wed Oct 15 00:58:24 2014 
+## Date of summary: Wed Oct 15 00:58:24 2014 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 48 model solutions performed in 0.26 s
+## Fitted with method Port using 66 model solutions performed in 0.359 s
 ## 
 ## Weighting: none
 ## 
diff --git a/vignettes/FOCUS_Z.pdf b/vignettes/FOCUS_Z.pdf
index b5898b7c..0013cd5e 100644
Binary files a/vignettes/FOCUS_Z.pdf and b/vignettes/FOCUS_Z.pdf differ
-- 
cgit v1.2.1