aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-10-21 21:52:33 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2019-10-21 21:52:33 +0200
commit86e6d8368109d1a9c631af45227659178ce934ee (patch)
treed0fad8031db7839faf02d5e8d4130cd734e6df3f
parent0b9d87701328720558c2c7206c790ed1b17ce7bb (diff)
Fix platform dependence of the correlation matrix
Especially on winbuilder (i386 and amd64)
-rw-r--r--test.log14
-rw-r--r--tests/testthat/summary_DFOP_FOCUS_C.txt7
-rw-r--r--tests/testthat/summary_DFOP_FOCUS_D_eigen.txt13
-rw-r--r--tests/testthat/test_plots_summary_twa.R5
4 files changed, 10 insertions, 29 deletions
diff --git a/test.log b/test.log
index 6503f81a..901091a1 100644
--- a/test.log
+++ b/test.log
@@ -3,7 +3,7 @@ Testing mkin
✔ | OK F W S | Context
✔ | 2 | Export dataset for reading into CAKE
✔ | 3 | Confidence intervals and p-values
-✔ | 11 | Error model fitting [51.4 s]
+✔ | 11 | Error model fitting [51.0 s]
✔ | 5 | Calculation of FOCUS chi2 error levels [3.5 s]
✔ | 13 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [3.5 s]
✔ | 6 | Test fitting the decline of metabolites from their maximum [0.9 s]
@@ -14,22 +14,18 @@ Testing mkin
✔ | 3 | Model predictions with mkinpredict [0.3 s]
✔ | 16 | Evaluations according to 2015 NAFTA guidance [4.0 s]
✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2 s]
-✔ | 3 1 | Summary
-────────────────────────────────────────────────────────────────────────────────
-test_plots_summary_twa.R:86: warning: Summaries are reproducible
-Creating reference output
-────────────────────────────────────────────────────────────────────────────────
+✔ | 3 | Summary
✔ | 7 | Plotting [0.4 s]
✔ | 3 | AIC calculation
✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [5.3 s]
✔ | 4 | Fitting the SFORB model [1.7 s]
✔ | 1 | Summaries of old mkinfit objects
-✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.2 s]
+✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [7.1 s]
══ Results ═════════════════════════════════════════════════════════════════════
-Duration: 84.3 s
+Duration: 83.9 s
OK: 110
Failed: 0
-Warnings: 1
+Warnings: 0
Skipped: 0
diff --git a/tests/testthat/summary_DFOP_FOCUS_C.txt b/tests/testthat/summary_DFOP_FOCUS_C.txt
index 90ce82e2..14e00f62 100644
--- a/tests/testthat/summary_DFOP_FOCUS_C.txt
+++ b/tests/testthat/summary_DFOP_FOCUS_C.txt
@@ -42,12 +42,7 @@ g_ilr 1.2490 0.05811 1.0870 1.4100
sigma 0.6962 0.16410 0.2406 1.1520
Parameter correlation:
- parent_0 log_k1 log_k2 g_ilr sigma
-parent_0 1e+00 4e-01 9e-02 -3e-02 5e-07
-log_k1 4e-01 1e+00 5e-01 -7e-01 4e-07
-log_k2 9e-02 5e-01 1e+00 -8e-01 -1e-07
-g_ilr -3e-02 -7e-01 -8e-01 1e+00 -2e-08
-sigma 5e-07 4e-07 -1e-07 -2e-08 1e+00
+NULL
Backtransformed parameters:
Confidence intervals for internally transformed parameters are asymmetric.
diff --git a/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt b/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt
index b570a15e..1626c5da 100644
--- a/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt
+++ b/tests/testthat/summary_DFOP_FOCUS_D_eigen.txt
@@ -42,18 +42,7 @@ log_k_m1_sink -5.248 0.13320 -5.518 -4.977
sigma 3.126 0.35850 2.396 3.855
Parameter correlation:
- parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink
-parent_0 1e+00 6e-01 -6e-02 -2e-01
-log_k_parent_sink 6e-01 1e+00 -9e-02 -6e-01
-log_k_parent_m1 -6e-02 -9e-02 1e+00 5e-01
-log_k_m1_sink -2e-01 -6e-01 5e-01 1e+00
-sigma 1e-09 6e-10 3e-08 1e-09
- sigma
-parent_0 1e-09
-log_k_parent_sink 6e-10
-log_k_parent_m1 3e-08
-log_k_m1_sink 1e-09
-sigma 1e+00
+NULL
Backtransformed parameters:
Confidence intervals for internally transformed parameters are asymmetric.
diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R
index 306a585c..9c802b00 100644
--- a/tests/testthat/test_plots_summary_twa.R
+++ b/tests/testthat/test_plots_summary_twa.R
@@ -56,7 +56,7 @@ test_that("Summaries are reproducible", {
# The correlation matrix is quite platform dependent
# It differs between i386 and amd64 on Windows
# and between Travis and my own Linux system
- test_summary$Corr <- signif(test_summary$Corr, 1)
+ test_summary$Corr <- NULL
expect_known_output(print(test_summary), "summary_DFOP_FOCUS_C.txt")
test_summary_2 <- summary(f_sfo_sfo_eigen)
@@ -69,7 +69,8 @@ test_that("Summaries are reproducible", {
# The correlation matrix is quite platform dependent
# It differs between i386 and amd64 on Windows
# and between Travis and my own Linux system
- test_summary_2$Corr <- signif(test_summary_2$Corr, 1)
+ # Even more so when using the Eigen method
+ test_summary_2$Corr <- NULL
expect_known_output(print(test_summary_2), "summary_DFOP_FOCUS_D_eigen.txt")
test_summary_3 <- summary(f_sfo_sfo_desolve)

Contact - Imprint