From 7faf98ac5475bb2041d7e434478c58c2f2cec0fd Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 28 Jun 2016 08:23:38 +0200 Subject: Static documentation rebuilt by staticdocs::build_site() --- inst/web/vignettes/FOCUS_D.html | 12 +++--- inst/web/vignettes/FOCUS_L.html | 74 ++++++++++++++++---------------- inst/web/vignettes/FOCUS_Z.pdf | Bin 238788 -> 238788 bytes inst/web/vignettes/compiled_models.html | 38 ++++++++-------- inst/web/vignettes/mkin.html | 2 +- 5 files changed, 63 insertions(+), 63 deletions(-) (limited to 'inst/web/vignettes') diff --git a/inst/web/vignettes/FOCUS_D.html b/inst/web/vignettes/FOCUS_D.html index e01c5869..c7e2047f 100644 --- a/inst/web/vignettes/FOCUS_D.html +++ b/inst/web/vignettes/FOCUS_D.html @@ -184,16 +184,16 @@ print(FOCUS_2006_D)
fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE)

A plot of the fit including a residual plot for both observed variables is obtained using the plot method for mkinfit objects.

plot(fit, show_residuals = TRUE)
-

+

Confidence intervals for the parameter estimates are obtained using the mkinparplot function.

mkinparplot(fit)
-

+

A comprehensive report of the results is obtained using the summary method for mkinfit objects.

summary(fit)
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:43 2016 
-## Date of summary: Tue Jun 28 01:59:44 2016 
+## Date of fit:     Tue Jun 28 08:19:31 2016 
+## Date of summary: Tue Jun 28 08:19:31 2016 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent - k_parent_m1 * parent
@@ -201,7 +201,7 @@ print(FOCUS_2006_D)
## ## Model predictions using solution type deSolve ## -## Fitted with method Port using 153 model solutions performed in 1.698 s +## Fitted with method Port using 153 model solutions performed in 1.706 s ## ## Weighting: none ## diff --git a/inst/web/vignettes/FOCUS_L.html b/inst/web/vignettes/FOCUS_L.html index 828d9def..05b9bdbd 100644 --- a/inst/web/vignettes/FOCUS_L.html +++ b/inst/web/vignettes/FOCUS_L.html @@ -233,17 +233,17 @@ FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1)

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.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:45 2016 
-## Date of summary: Tue Jun 28 01:59:45 2016 
+## Date of fit:     Tue Jun 28 08:19:32 2016 
+## Date of summary: Tue Jun 28 08:19:32 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.243 s
+## Fitted with method Port using 37 model solutions performed in 0.245 s
 ## 
 ## Weighting: none
 ## 
@@ -315,21 +315,21 @@ summary(m.L1.SFO)
## 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.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:47 2016 
-## Date of summary: Tue Jun 28 01:59:47 2016 
+## Date of fit:     Tue Jun 28 08:19:34 2016 
+## Date of summary: Tue Jun 28 08:19:34 2016 
 ## 
 ## 
 ## Warning: Optimisation by method Port did not converge.
@@ -341,7 +341,7 @@ summary(m.L1.SFO)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 188 model solutions performed in 1.241 s +## Fitted with method Port using 188 model solutions performed in 1.216 s ## ## Weighting: none ## @@ -410,7 +410,7 @@ FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2)
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")
-

+

The χ2 error level of 14% suggests that the model does not fit very well. This is also obvious from the plots of the fit, in which we have included the residual plot.

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 day 5), and there is an underestimation beyond that point.

We may add that it is difficult to judge the random nature of the residuals just from the three samplings at days 0, 1 and 3. Also, it is not clear a priori why a consistent underestimation after the approximate DT90 should be irrelevant. However, this can be rationalised by the fact that the FOCUS fate models generally only implement SFO kinetics.

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

+

summary(m.L2.FOMC, data = FALSE)
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:49 2016 
-## Date of summary: Tue Jun 28 01:59:49 2016 
+## Date of fit:     Tue Jun 28 08:19:36 2016 
+## Date of summary: Tue Jun 28 08:19:36 2016 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 81 model solutions performed in 0.534 s
+## Fitted with method Port using 81 model solutions performed in 0.537 s
 ## 
 ## Weighting: none
 ## 
@@ -491,12 +491,12 @@ plot(m.L2.FOMC, show_residuals = TRUE,
 
m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, quiet = TRUE)
 plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
      main = "FOCUS L2 - DFOP")
-

+

summary(m.L2.DFOP, data = FALSE)
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:52 2016 
-## Date of summary: Tue Jun 28 01:59:52 2016 
+## Date of fit:     Tue Jun 28 08:19:39 2016 
+## Date of summary: Tue Jun 28 08:19:39 2016 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -505,7 +505,7 @@ plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE,
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 2.286 s
+## Fitted with method Port using 336 model solutions performed in 2.267 s
 ## 
 ## Weighting: none
 ## 
@@ -574,7 +574,7 @@ FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3)
mm.L3 <- mmkin(c("SFO", "FOMC", "DFOP"), cores = 1, list("FOCUS L3" = FOCUS_2006_L3_mkin), quiet = TRUE) plot(mm.L3)
-

+

The χ2 error level of 21% as well as the plot suggest that the SFO model does not fit very well. The FOMC model performs better, with an error level at which the χ2 test passes of 7%. Fitting the four parameter DFOP model further reduces the χ2 error level considerably.

@@ -582,10 +582,10 @@ plot(mm.L3)

The objects returned by mmkin are arranged like a matrix, with models as a row index and datasets as a column index.

We can extract the summary and plot for e.g. the DFOP fit, using square brackets for indexing which will result in the use of the summary and plot functions working on mkinfit objects.

summary(mm.L3[["DFOP", 1]])
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:55 2016 
-## Date of summary: Tue Jun 28 01:59:56 2016 
+## Date of fit:     Tue Jun 28 08:19:41 2016 
+## Date of summary: Tue Jun 28 08:19:42 2016 
 ## 
 ## Equations:
 ## d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -594,7 +594,7 @@ plot(mm.L3)
## ## Model predictions using solution type analytical ## -## Fitted with method Port using 137 model solutions performed in 0.907 s +## Fitted with method Port using 137 model solutions performed in 0.924 s ## ## Weighting: none ## @@ -661,7 +661,7 @@ plot(mm.L3)
## 91 parent 15.0 15.18 -0.18181 ## 120 parent 12.0 10.19 1.81395
plot(mm.L3[["DFOP", 1]], show_errmin = TRUE)
-

+

Here, a look to the model plot, the confidence intervals of the parameters and the correlation matrix suggest that the parameter estimates are reliable, and the DFOP model can be used as the best-fit model based on the χ2 error level criterion for laboratory data L3.

This is also an example where the standard t-test for the parameter g_ilr is misleading, as it tests for a significant difference from zero. In this case, zero appears to be the correct value for this parameter, and the confidence interval for the backtransformed parameter g is quite narrow.

@@ -679,20 +679,20 @@ mm.L4 <- mmkin(c("SFO", "FOMC"), cores = 1, list("FOCUS L4" = FOCUS_2006_L4_mkin), quiet = TRUE) plot(mm.L4) -

+

The χ2 error level of 3.3% as well as the plot suggest that the SFO model fits very well. The error level at which the χ2 test passes is slightly lower for the FOMC model. However, the difference appears negligible.

summary(mm.L4[["SFO", 1]], data = FALSE)
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:57 2016 
-## Date of summary: Tue Jun 28 01:59:58 2016 
+## Date of fit:     Tue Jun 28 08:19:42 2016 
+## Date of summary: Tue Jun 28 08:19:43 2016 
 ## 
 ## Equations:
 ## d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 46 model solutions performed in 0.306 s
+## Fitted with method Port using 46 model solutions performed in 0.307 s
 ## 
 ## Weighting: none
 ## 
@@ -742,17 +742,17 @@ plot(mm.L4)
## DT50 DT90 ## parent 106 352
summary(mm.L4[["FOMC", 1]], data = FALSE)
-
## mkin version:    0.9.43 
+
## mkin version:    0.9.43.9000 
 ## R version:       3.3.1 
-## Date of fit:     Tue Jun 28 01:59:57 2016 
-## Date of summary: Tue Jun 28 01:59:58 2016 
+## Date of fit:     Tue Jun 28 08:19:43 2016 
+## Date of summary: Tue Jun 28 08:19:43 2016 
 ## 
 ## Equations:
 ## d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.42 s
+## Fitted with method Port using 66 model solutions performed in 0.414 s
 ## 
 ## Weighting: none
 ## 
diff --git a/inst/web/vignettes/FOCUS_Z.pdf b/inst/web/vignettes/FOCUS_Z.pdf
index efda950f..1f9560b0 100644
Binary files a/inst/web/vignettes/FOCUS_Z.pdf and b/inst/web/vignettes/FOCUS_Z.pdf differ
diff --git a/inst/web/vignettes/compiled_models.html b/inst/web/vignettes/compiled_models.html
index 5e426a7f..cec76ef9 100644
--- a/inst/web/vignettes/compiled_models.html
+++ b/inst/web/vignettes/compiled_models.html
@@ -20,7 +20,7 @@
 
 
 
-
+
 
 
 
@@ -250,21 +250,21 @@ mb.1 <- microbenchmark(
 print(mb.1)
## Unit: seconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 25.042204 25.078629 25.467550 25.115054 25.680223
-##       Eigenvalue based  2.273059  2.277424  2.285719  2.281790  2.292049
-##      deSolve, compiled  1.878785  1.883750  1.891594  1.888716  1.897998
-##        max neval cld
-##  26.245391     3   b
-##   2.302308     3  a 
-##   1.907281     3  a
+## deSolve, not compiled 25.422123 25.889685 26.065978 26.357247 26.387905 +## Eigenvalue based 2.243667 2.254539 2.277770 2.265412 2.294821 +## deSolve, compiled 1.849468 1.865343 1.871339 1.881219 1.882274 +## max neval cld +## 26.41856 3 b +## 2.32423 3 a +## 1.88333 3 a
autoplot(mb.1)
-

-

We see that using the compiled model is by a factor of 13.3 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

+

+

We see that using the compiled model is by a factor of 14 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

rownames(smb.1) <- smb.1$expr
 smb.1["median"]/smb.1["deSolve, compiled", "median"]
##                          median
-## deSolve, not compiled 13.297425
-## Eigenvalue based       1.208117
+## deSolve, not compiled 14.010730
+## Eigenvalue based       1.204226
 ## deSolve, compiled      1.000000
@@ -285,20 +285,20 @@ smb.1["median"]/smb.1["deSolve, compiled", "median"
smb.2 <- summary(mb.2)
 print(mb.2)
## Unit: seconds
-##                   expr      min        lq      mean    median        uq
-##  deSolve, not compiled 53.69252 53.938844 54.137601 54.185167 54.360141
-##      deSolve, compiled  3.42508  3.526298  3.588392  3.627516  3.670048
+##                   expr       min       lq      mean    median        uq
+##  deSolve, not compiled 54.386189 54.39423 54.477986 54.402271 54.523884
+##      deSolve, compiled  3.424205  3.53522  3.574587  3.646236  3.649778
 ##        max neval cld
-##  54.535116     3   b
-##   3.712579     3  a
+## 54.645498 3 b +## 3.653319 3 a
smb.2["median"]/smb.2["deSolve, compiled", "median"]
##   median
 ## 1     NA
 ## 2     NA
autoplot(mb.2)
-

+

Here we get a performance benefit of a factor of 14.9 using the version of the differential equation model compiled from C code!

-

This vignette was built with mkin 0.9.43 on

+

This vignette was built with mkin 0.9.43.9000 on

## R version 3.3.1 (2016-06-21)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
 ## Running under: Debian GNU/Linux 8 (jessie)
diff --git a/inst/web/vignettes/mkin.html b/inst/web/vignettes/mkin.html index 9a76dc48..f9704eda 100644 --- a/inst/web/vignettes/mkin.html +++ b/inst/web/vignettes/mkin.html @@ -256,7 +256,7 @@ d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, function(x) 3, n = 1, seed = 1234 f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE) plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright")) -

+

Background

-- cgit v1.2.1