From bbb74d4f60033899cd5cdd36aa70f157bc52209e Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 1 Nov 2019 12:19:03 +0100 Subject: Fix bug in yesterdays release, add methods for BIC --- docs/articles/FOCUS_D.html | 21 +- docs/articles/FOCUS_D_files/figure-html/plot-1.png | Bin 97716 -> 97426 bytes docs/articles/FOCUS_L.html | 117 ++++---- .../figure-html/unnamed-chunk-10-1.png | Bin 29061 -> 29158 bytes .../figure-html/unnamed-chunk-8-1.png | Bin 27887 -> 27992 bytes .../figure-html/unnamed-chunk-9-1.png | Bin 28307 -> 28432 bytes docs/articles/FOCUS_Z.html | 332 --------------------- docs/articles/FOCUS_Z.pdf | Bin 384032 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_1-1.png | Bin 86312 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_10-1.png | Bin 129920 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_11-1.png | Bin 129452 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_11a-1.png | Bin 97933 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_11b-1.png | Bin 22321 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_2-1.png | Bin 86923 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_3-1.png | Bin 86529 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_5-1.png | Bin 102872 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_6-1.png | Bin 130096 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_7-1.png | Bin 130164 -> 0 bytes .../figure-html/FOCUS_2006_Z_fits_9-1.png | Bin 109280 -> 0 bytes docs/articles/compiled_models.html | 201 ------------- docs/articles/index.html | 2 +- docs/articles/mkin.html | 2 +- docs/articles/mkin_vignettes.css | 16 - docs/articles/references.bib | 112 ------- docs/articles/twa.html | 3 +- docs/articles/web_only/FOCUS_Z.html | 34 +-- .../figure-html/FOCUS_2006_Z_fits_1-1.png | Bin 84962 -> 85185 bytes .../figure-html/FOCUS_2006_Z_fits_10-1.png | Bin 127841 -> 128361 bytes .../figure-html/FOCUS_2006_Z_fits_11-1.png | Bin 127069 -> 127413 bytes .../figure-html/FOCUS_2006_Z_fits_11a-1.png | Bin 95832 -> 95903 bytes .../figure-html/FOCUS_2006_Z_fits_2-1.png | Bin 85657 -> 85869 bytes .../figure-html/FOCUS_2006_Z_fits_3-1.png | Bin 85239 -> 85461 bytes .../figure-html/FOCUS_2006_Z_fits_5-1.png | Bin 101416 -> 102008 bytes .../figure-html/FOCUS_2006_Z_fits_6-1.png | Bin 128185 -> 128536 bytes .../figure-html/FOCUS_2006_Z_fits_7-1.png | Bin 127782 -> 128135 bytes .../figure-html/FOCUS_2006_Z_fits_9-1.png | Bin 107730 -> 108179 bytes docs/articles/web_only/NAFTA_examples.html | 27 +- docs/articles/web_only/benchmarks.html | 25 +- docs/articles/web_only/compiled_models.html | 13 +- 39 files changed, 103 insertions(+), 802 deletions(-) delete mode 100644 docs/articles/FOCUS_Z.html delete mode 100644 docs/articles/FOCUS_Z.pdf delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png delete mode 100644 docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png delete mode 100644 docs/articles/compiled_models.html delete mode 100644 docs/articles/mkin_vignettes.css delete mode 100644 docs/articles/references.bib (limited to 'docs/articles') diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index f8c51e2d..42361b92 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -90,7 +90,7 @@

Example evaluation of FOCUS Example Dataset D

Johannes Ranke

-

2019-09-19

+

2019-11-01

@@ -170,8 +170,8 @@
summary(fit)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:52:55 2019 
-## Date of summary: Thu Sep 19 09:52:56 2019 
+## Date of fit:     Fri Nov  1 10:10:44 2019 
+## Date of summary: Fri Nov  1 10:10:44 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
@@ -179,19 +179,18 @@
 ## 
 ## Model predictions using solution type deSolve 
 ## 
-## Fitted using 389 model solutions performed in 1.001 s
+## Fitted using 389 model solutions performed in 1.015 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##                    value   type
-## parent_0      100.750000  state
-## k_parent_sink   0.100000 deparm
-## k_parent_m1     0.100100 deparm
-## k_m1_sink       0.100200 deparm
-## sigma           3.125504  error
+##                  value   type
+## parent_0      100.7500  state
+## k_parent_sink   0.1000 deparm
+## k_parent_m1     0.1001 deparm
+## k_m1_sink       0.1002 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##                        value lower upper
@@ -199,7 +198,6 @@
 ## log_k_parent_sink  -2.302585  -Inf   Inf
 ## log_k_parent_m1    -2.301586  -Inf   Inf
 ## log_k_m1_sink      -2.300587  -Inf   Inf
-## sigma               3.125504     0   Inf
 ## 
 ## Fixed parameter values:
 ##      value  type
@@ -298,6 +296,7 @@
   
 
   
 
 
diff --git a/docs/articles/FOCUS_D_files/figure-html/plot-1.png b/docs/articles/FOCUS_D_files/figure-html/plot-1.png
index fc1142ab..6f4fa093 100644
Binary files a/docs/articles/FOCUS_D_files/figure-html/plot-1.png and b/docs/articles/FOCUS_D_files/figure-html/plot-1.png differ
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 7b35beeb..4033beba 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -90,7 +90,7 @@
       

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

2019-09-19

+

2019-11-01

@@ -116,8 +116,8 @@ summary(m.L1.SFO)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:52:57 2019 
-## Date of summary: Thu Sep 19 09:52:57 2019 
+## Date of fit:     Fri Nov  1 10:10:46 2019 
+## Date of summary: Fri Nov  1 10:10:46 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
@@ -131,16 +131,14 @@
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##                   value   type
-## parent_0      89.850000  state
-## k_parent_sink  0.100000 deparm
-## sigma          2.779827  error
+##               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
-## sigma              2.779827     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -214,12 +212,12 @@
 
summary(m.L1.FOMC, data = FALSE)
## Warning in sqrt(diag(covar)): NaNs wurden erzeugt
## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt
-
## Warning in cov2cor(ans$cov.unscaled): diag(.) had 0 or NA entries; non-
-## finite result is doubtful
+
## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite
+## result is doubtful
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:52:59 2019 
-## Date of summary: Thu Sep 19 09:52:59 2019 
+## Date of fit:     Fri Nov  1 10:10:48 2019 
+## Date of summary: Fri Nov  1 10:10:48 2019 
 ## 
 ## 
 ## Warning: Optimisation did not converge:
@@ -231,25 +229,23 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 899 model solutions performed in 1.908 s
+## Fitted using 899 model solutions performed in 1.91 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##              value   type
-## parent_0 89.850000  state
-## alpha     1.000000 deparm
-## beta     10.000000 deparm
-## sigma     2.779871  error
+##          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
-## sigma      2.779871     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -323,33 +319,31 @@
 
summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:53:00 2019 
-## Date of summary: Thu Sep 19 09:53:00 2019 
+## Date of fit:     Fri Nov  1 10:10:49 2019 
+## Date of summary: Fri Nov  1 10:10:49 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 239 model solutions performed in 0.49 s
+## Fitted using 239 model solutions performed in 0.489 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##              value   type
-## parent_0 93.950000  state
-## alpha     1.000000 deparm
-## beta     10.000000 deparm
-## sigma     2.275722  error
+##          value   type
+## parent_0 93.95  state
+## alpha     1.00 deparm
+## beta     10.00 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##               value lower upper
 ## parent_0  93.950000  -Inf   Inf
 ## log_alpha  0.000000  -Inf   Inf
 ## log_beta   2.302585  -Inf   Inf
-## sigma      2.275722     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -399,8 +393,8 @@
 
summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:53:02 2019 
-## Date of summary: Thu Sep 19 09:53:02 2019 
+## Date of fit:     Fri Nov  1 10:10:51 2019 
+## Date of summary: Fri Nov  1 10:10:51 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -409,19 +403,18 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 572 model solutions performed in 1.204 s
+## Fitted using 572 model solutions performed in 1.218 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##              value   type
-## parent_0 93.950000  state
-## k1        0.100000 deparm
-## k2        0.010000 deparm
-## g         0.500000 deparm
-## sigma     1.413899  error
+##          value   type
+## parent_0 93.95  state
+## k1        0.10 deparm
+## k2        0.01 deparm
+## g         0.50 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##              value lower upper
@@ -429,7 +422,6 @@
 ## log_k1   -2.302585  -Inf   Inf
 ## log_k2   -4.605170  -Inf   Inf
 ## g_ilr     0.000000  -Inf   Inf
-## sigma     1.413899     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -499,8 +491,8 @@
 
summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:53:04 2019 
-## Date of summary: Thu Sep 19 09:53:04 2019 
+## Date of fit:     Fri Nov  1 10:10:53 2019 
+## Date of summary: Fri Nov  1 10:10:53 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -509,19 +501,18 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 373 model solutions performed in 0.799 s
+## Fitted using 373 model solutions performed in 0.784 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##              value   type
-## parent_0 97.800000  state
-## k1        0.100000 deparm
-## k2        0.010000 deparm
-## g         0.500000 deparm
-## sigma     1.017292  error
+##          value   type
+## parent_0 97.80  state
+## k1        0.10 deparm
+## k2        0.01 deparm
+## g         0.50 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##              value lower upper
@@ -529,7 +520,6 @@
 ## log_k1   -2.302585  -Inf   Inf
 ## log_k2   -4.605170  -Inf   Inf
 ## g_ilr     0.000000  -Inf   Inf
-## sigma     1.017292     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -605,31 +595,29 @@
 
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:53:04 2019 
-## Date of summary: Thu Sep 19 09:53:05 2019 
+## Date of fit:     Fri Nov  1 10:10:53 2019 
+## Date of summary: Fri Nov  1 10:10:54 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 142 model solutions performed in 0.287 s
+## Fitted using 142 model solutions performed in 0.292 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##                  value   type
-## parent_0      96.60000  state
-## k_parent_sink  0.10000 deparm
-## sigma          3.16181  error
+##               value   type
+## parent_0       96.6  state
+## k_parent_sink   0.1 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##                       value lower upper
 ## parent_0          96.600000  -Inf   Inf
 ## log_k_parent_sink -2.302585  -Inf   Inf
-## sigma              3.161810     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -670,33 +658,31 @@
 
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    0.9.49.6 
 ## R version used for fitting:       3.6.1 
-## Date of fit:     Thu Sep 19 09:53:05 2019 
-## Date of summary: Thu Sep 19 09:53:05 2019 
+## Date of fit:     Fri Nov  1 10:10:54 2019 
+## Date of summary: Fri Nov  1 10:10:54 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 224 model solutions performed in 0.48 s
+## Fitted using 224 model solutions performed in 0.455 s
 ## 
 ## Error model: Constant variance 
 ## 
 ## Error model algorithm: OLS 
 ## 
 ## Starting values for parameters to be optimised:
-##              value   type
-## parent_0 96.600000  state
-## alpha     1.000000 deparm
-## beta     10.000000 deparm
-## sigma     1.830055  error
+##          value   type
+## parent_0  96.6  state
+## alpha      1.0 deparm
+## beta      10.0 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
 ##               value lower upper
 ## parent_0  96.600000  -Inf   Inf
 ## log_alpha  0.000000  -Inf   Inf
 ## log_beta   2.302585  -Inf   Inf
-## sigma      1.830055     0   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -746,6 +732,7 @@
   
 
   
 
   
 
 
diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html
index 5ea0b256..14234785 100644
--- a/docs/articles/web_only/FOCUS_Z.html
+++ b/docs/articles/web_only/FOCUS_Z.html
@@ -90,7 +90,7 @@
       

Example evaluation of FOCUS dataset Z

Johannes Ranke

-

2019-09-19

+

2019-11-01

@@ -244,36 +244,7 @@
plot_sep(m.Z.mkin.1)

summary(m.Z.mkin.1, data = FALSE)$cov.unscaled
-
##                            Z0_0 log_k_Z0_Z1 log_k_Z1_Z2 log_k_Z2_sink
-## Z0_0                 3.8375e+00  5.4918e-03  3.0584e-02    1.2969e-01
-## log_k_Z0_Z1          5.4918e-03  2.7613e-03 -1.8820e-04    2.6634e-04
-## log_k_Z1_Z2          3.0584e-02 -1.8820e-04  3.3807e-03    3.2177e-03
-## log_k_Z2_sink        1.2969e-01  2.6634e-04  3.2177e-03    3.4256e-02
-## log_k_Z2_Z3_free    -2.4223e-02 -2.6169e-04 -1.1845e-03   -8.1134e-03
-## log_k_Z3_free_sink  -6.5467e-02 -4.0815e-04 -3.2978e-03   -3.6010e-02
-## log_k_Z3_free_bound -6.0659e-02 -4.4768e-04 -3.0588e-03   -3.9074e-02
-## log_k_Z3_bound_free  5.2844e-01  4.5458e-03  7.9800e-03    4.6274e-02
-## sigma                2.0366e-10 -3.4658e-10  8.9910e-11   -2.5946e-10
-##                     log_k_Z2_Z3_free log_k_Z3_free_sink
-## Z0_0                     -2.4223e-02        -6.5467e-02
-## log_k_Z0_Z1              -2.6169e-04        -4.0815e-04
-## log_k_Z1_Z2              -1.1845e-03        -3.2978e-03
-## log_k_Z2_sink            -8.1134e-03        -3.6010e-02
-## log_k_Z2_Z3_free          1.5500e-02         2.1583e-02
-## log_k_Z3_free_sink        2.1583e-02         7.5705e-02
-## log_k_Z3_free_bound       2.5836e-02         1.1964e-01
-## log_k_Z3_bound_free       5.2534e-02         2.9441e-01
-## sigma                     1.3063e-10         3.4170e-10
-##                     log_k_Z3_free_bound log_k_Z3_bound_free       sigma
-## Z0_0                        -6.0659e-02          5.2844e-01  2.0366e-10
-## log_k_Z0_Z1                 -4.4768e-04          4.5458e-03 -3.4658e-10
-## log_k_Z1_Z2                 -3.0588e-03          7.9800e-03  8.9910e-11
-## log_k_Z2_sink               -3.9074e-02          4.6274e-02 -2.5946e-10
-## log_k_Z2_Z3_free             2.5836e-02          5.2534e-02  1.3063e-10
-## log_k_Z3_free_sink           1.1964e-01          2.9441e-01  3.4170e-10
-## log_k_Z3_free_bound          6.5902e-01          5.4737e+00 -6.7704e-10
-## log_k_Z3_bound_free          5.4737e+00          2.8722e+08  7.2421e-02
-## sigma                       -6.7704e-10          7.2421e-02  1.4170e-01
+
## NULL

Therefore, a further stepwise model building is performed starting from the stage of parent and two metabolites, starting from the assumption that the model fit for the parent compound can be improved by using the SFORB model.

Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE),
                     Z1 = mkinsub("SFO", "Z2", sink = FALSE),
@@ -358,6 +329,7 @@
   
+## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.6 10.787
save(mkin_benchmarks, file = "~/git/mkin/vignettes/mkin_benchmarks.rda")
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   3.171    1.000     3.170        0
-## 1 deSolve, not compiled            3  29.012    9.149    28.996        0
-## 2      Eigenvalue based            3   4.473    1.411     4.470        0
+## 3     deSolve, compiled            3   3.143    1.000     3.142        0
+## 1 deSolve, not compiled            3  29.169    9.281    29.154        0
+## 2      Eigenvalue based            3   4.358    1.387     4.356        0
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
@@ -216,8 +216,8 @@
 ## Warning in mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE): Observations with
 ## value of zero were removed from the data
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   4.913    1.000     4.909        0
-## 1 deSolve, not compiled            3  53.418   10.873    53.393        0
+## 2     deSolve, compiled            3   4.840    1.000     4.837        0
+## 1 deSolve, not compiled            3  54.338   11.227    54.309        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
@@ -231,6 +231,7 @@