From d34e5c053794a08cc73c9042ccccfb334ae0f62d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 16 Apr 2015 09:53:58 +0200 Subject: Pending commit of an updated vignette --- vignettes/FOCUS_L.html | 153 ++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 77 deletions(-) diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index b5228532..96ea70ce 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -214,7 +214,13 @@ hr { report, p. 284:

library("mkin")
-FOCUS_2006_L1 = data.frame(
+
+ +
## Loading required package: minpack.lm
+## Loading required package: rootSolve
+
+ +
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,
@@ -236,17 +242,17 @@ given in the FOCUS report. 

summary(m.L1.SFO)
-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:49 2014 
-## Date of summary: Thu Dec 18 09:52:49 2014 
+## Date of fit:     Sat Feb 21 14:44:53 2015 
+## Date of summary: Sat Feb 21 14:44:53 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 37 model solutions performed in 0.214 s
+## Fitted with method Port using 37 model solutions performed in 0.098 s
 ## 
 ## Weighting: none
 ## 
@@ -323,43 +329,32 @@ summary(m.L1.SFO)
 
plot(m.L1.SFO)
 
-

plot of chunk unnamed-chunk-4 +

plot of chunk unnamed-chunk-4 The residual plot can be easily obtained by

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

plot of chunk unnamed-chunk-5

+

plot of chunk unnamed-chunk-5

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

m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
+summary(m.L1.FOMC, data = FALSE)
 
-
## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation by method Port did not converge.
-## Convergence code is 1
-
- -
summary(m.L1.FOMC, data = FALSE)
-
- -
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:50 2014 
-## Date of summary: Thu Dec 18 09:52:50 2014 
-## 
-## 
-## Warning: Optimisation by method Port did not converge.
-## Convergence code is 1 
-## 
+## Date of fit:     Sat Feb 21 14:44:55 2015 
+## Date of summary: Sat Feb 21 14:44:55 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 188 model solutions performed in 1.085 s
+## Fitted with method Port using 611 model solutions performed in 1.509 s
 ## 
 ## Weighting: none
 ## 
@@ -379,24 +374,28 @@ is checked.

## None ## ## Optimised, transformed parameters: -## Estimate Std. Error Lower Upper t value Pr(>|t|) Pr(>t) -## parent_0 92.47 1.422 89.44 95.50 65.030 8.317e-20 4.158e-20 -## log_alpha 15.43 15.080 -16.71 47.58 1.023 3.224e-01 1.612e-01 -## log_beta 17.78 15.090 -14.37 49.93 1.179 2.569e-01 1.284e-01 +## Estimate Std. Error Lower Upper t value Pr(>|t|) +## parent_0 92.47 1.482 89.31 95.63 62.39000 1.546e-19 +## log_alpha 11.25 598.200 -1264.00 1286.00 0.01880 9.852e-01 +## log_beta 13.60 598.200 -1261.00 1289.00 0.02273 9.822e-01 +## Pr(>t) +## parent_0 7.730e-20 +## log_alpha 4.926e-01 +## log_beta 4.911e-01 ## ## 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 +## parent_0 1.0000 -0.3016 -0.3016 +## log_alpha -0.3016 1.0000 1.0000 +## log_beta -0.3016 1.0000 1.0000 ## ## Residual standard error: 3.045 on 15 degrees of freedom ## ## Backtransformed parameters: -## Estimate Lower Upper -## parent_0 9.247e+01 8.944e+01 9.550e+01 -## alpha 5.044e+06 5.510e-08 4.618e+20 -## beta 5.276e+07 5.732e-07 4.857e+21 +## Estimate Lower Upper +## parent_0 92.47 89.31 95.63 +## alpha 76830.00 0.00 Inf +## beta 803500.00 0.00 Inf ## ## Chi2 error levels in percent: ## err.min n.optim df @@ -404,8 +403,8 @@ is checked.

## parent 3.619 3 6 ## ## Estimated disappearance times: -## DT50 DT90 DT50back -## parent 7.25 24.08 7.25 +## DT50 DT90 DT50back +## parent 7.249 24.08 7.249

Due to the higher number of parameters, and the lower number of degrees of @@ -443,17 +442,17 @@ FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2) summary(m.L2.SFO)

-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:51 2014 
-## Date of summary: Thu Dec 18 09:52:51 2014 
+## Date of fit:     Sat Feb 21 14:44:55 2015 
+## Date of summary: Sat Feb 21 14:44:55 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 41 model solutions performed in 0.238 s
+## Fitted with method Port using 41 model solutions performed in 0.1 s
 ## 
 ## Weighting: none
 ## 
@@ -527,7 +526,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 @@ -548,22 +547,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 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:51 2014 
-## Date of summary: Thu Dec 18 09:52:51 2014 
+## Date of fit:     Sat Feb 21 14:44:55 2015 
+## Date of summary: Sat Feb 21 14:44:55 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 81 model solutions performed in 0.464 s
+## Fitted with method Port using 81 model solutions performed in 0.201 s
 ## 
 ## Weighting: none
 ## 
@@ -622,7 +621,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 @@ -634,15 +633,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 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:56 2014 
-## Date of summary: Thu Dec 18 09:52:56 2014 
+## Date of fit:     Sat Feb 21 14:44:57 2015 
+## Date of summary: Sat Feb 21 14:44:57 2015 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -651,7 +650,7 @@ plot(m.L2.DFOP)
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 1.986 s
+## Fitted with method Port using 336 model solutions performed in 0.856 s
 ## 
 ## Weighting: none
 ## 
@@ -723,22 +722,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 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:56 2014 
-## Date of summary: Thu Dec 18 09:52:56 2014 
+## Date of fit:     Sat Feb 21 14:44:57 2015 
+## Date of summary: Sat Feb 21 14:44:57 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 43 model solutions performed in 0.246 s
+## Fitted with method Port using 43 model solutions performed in 0.109 s
 ## 
 ## Weighting: none
 ## 
@@ -809,22 +808,22 @@ does not fit very well. 

plot(m.L3.FOMC)
-

plot of chunk unnamed-chunk-15

+

plot of chunk unnamed-chunk-15

summary(m.L3.FOMC, data = FALSE)
 
-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:57 2014 
-## Date of summary: Thu Dec 18 09:52:57 2014 
+## Date of fit:     Sat Feb 21 14:44:58 2015 
+## Date of summary: Sat Feb 21 14:44:58 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 83 model solutions performed in 0.475 s
+## Fitted with method Port using 83 model solutions performed in 0.203 s
 ## 
 ## Weighting: none
 ## 
@@ -882,15 +881,15 @@ considerably:

plot(m.L3.DFOP)
-

plot of chunk unnamed-chunk-16

+

plot of chunk unnamed-chunk-16

summary(m.L3.DFOP, data = FALSE)
 
-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:58 2014 
-## Date of summary: Thu Dec 18 09:52:58 2014 
+## Date of fit:     Sat Feb 21 14:44:58 2015 
+## Date of summary: Sat Feb 21 14:44:58 2015 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -899,7 +898,7 @@ plot(m.L3.DFOP)
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 137 model solutions performed in 0.813 s
+## Fitted with method Port using 137 model solutions performed in 0.346 s
 ## 
 ## Weighting: none
 ## 
@@ -980,22 +979,22 @@ FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4)
 plot(m.L4.SFO)
 
-

plot of chunk unnamed-chunk-18

+

plot of chunk unnamed-chunk-18

summary(m.L4.SFO, data = FALSE)
 
-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:58 2014 
-## Date of summary: Thu Dec 18 09:52:58 2014 
+## Date of fit:     Sat Feb 21 14:44:58 2015 
+## Date of summary: Sat Feb 21 14:44:58 2015 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 46 model solutions performed in 0.264 s
+## Fitted with method Port using 46 model solutions performed in 0.109 s
 ## 
 ## Weighting: none
 ## 
@@ -1055,22 +1054,22 @@ fits very well. 

plot(m.L4.FOMC)
-

plot of chunk unnamed-chunk-19

+

plot of chunk unnamed-chunk-19

summary(m.L4.FOMC, data = FALSE)
 
-
## mkin version:    0.9.34 
+
## mkin version:    0.9.35 
 ## R version:       3.1.2 
-## Date of fit:     Thu Dec 18 09:52:59 2014 
-## Date of summary: Thu Dec 18 09:52:59 2014 
+## Date of fit:     Sat Feb 21 14:44:58 2015 
+## Date of summary: Sat Feb 21 14:44:58 2015 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.375 s
+## Fitted with method Port using 66 model solutions performed in 0.161 s
 ## 
 ## Weighting: none
 ## 
-- 
cgit v1.2.1