aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-11-16 13:50:54 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-11-16 13:52:08 +0100
commit5889cd78376e244f38e6c5acba8ffbc46e18f803 (patch)
tree4aea13911582407f28a2c44e06089c4ee491236f
parent7094934f1061563725f6caa8723dc3e23c8ca677 (diff)
Address platform dependence that surfaced on winbuilder
-rw-r--r--log/test.log46
-rw-r--r--tests/testthat/test_multistart.R7
2 files changed, 29 insertions, 24 deletions
diff --git a/log/test.log b/log/test.log
index 7005ac37..eb8d6b9a 100644
--- a/log/test.log
+++ b/log/test.log
@@ -1,57 +1,57 @@
ℹ Testing mkin
✔ | F W S OK | Context
✔ | 5 | AIC calculation
-✔ | 5 | Analytical solutions for coupled models [3.2s]
+✔ | 5 | Analytical solutions for coupled models [3.7s]
✔ | 5 | Calculation of Akaike weights
✔ | 3 | Export dataset for reading into CAKE
-✔ | 12 | Confidence intervals and p-values [1.0s]
-✔ | 1 12 | Dimethenamid data from 2018 [32.4s]
+✔ | 12 | Confidence intervals and p-values [1.1s]
+✔ | 1 12 | Dimethenamid data from 2018 [37.5s]
────────────────────────────────────────────────────────────────────────────────
Skip ('test_dmta.R:98'): Different backends get consistent results for SFO-SFO3+, dimethenamid data
Reason: Fitting this ODE model with saemix takes about 15 minutes on my system
────────────────────────────────────────────────────────────────────────────────
-✔ | 14 | Error model fitting [4.9s]
+✔ | 14 | Error model fitting [5.5s]
✔ | 5 | Time step normalisation
-✔ | 4 | Calculation of FOCUS chi2 error levels [0.6s]
-✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.8s]
+✔ | 4 | Calculation of FOCUS chi2 error levels [0.7s]
+✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.9s]
✔ | 4 | Test fitting the decline of metabolites from their maximum [0.4s]
-✔ | 1 | Fitting the logistic model [0.2s]
-✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [24.2s]
-✔ | 1 12 | Nonlinear mixed-effects models [0.3s]
+✔ | 1 | Fitting the logistic model [0.3s]
+✔ | 10 | Batch fitting and diagnosing hierarchical kinetic models [27.2s]
+✔ | 1 12 | Nonlinear mixed-effects models [0.4s]
────────────────────────────────────────────────────────────────────────────────
Skip ('test_mixed.R:74'): saemix results are reproducible for biphasic fits
Reason: Fitting with saemix takes around 10 minutes when using deSolve
────────────────────────────────────────────────────────────────────────────────
✔ | 3 | Test dataset classes mkinds and mkindsg
-✔ | 10 | Special cases of mkinfit calls [0.5s]
-✔ | 3 | mkinfit features [0.7s]
+✔ | 10 | Special cases of mkinfit calls [0.6s]
+✔ | 3 | mkinfit features [0.8s]
✔ | 8 | mkinmod model generation and printing [0.2s]
✔ | 3 | Model predictions with mkinpredict [0.3s]
-✔ | 7 | Multistart method for saem.mmkin models [36.9s]
-✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.3s]
-✔ | 9 | Nonlinear mixed-effects models with nlme [8.6s]
-✔ | 16 | Plotting [9.8s]
+✔ | 9 | Multistart method for saem.mmkin models [45.7s]
+✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.7s]
+✔ | 9 | Nonlinear mixed-effects models with nlme [10.3s]
+✔ | 16 | Plotting [11.4s]
✔ | 4 | Residuals extracted from mkinfit models
-✔ | 1 36 | saemix parent models [66.3s]
+✔ | 1 36 | saemix parent models [75.4s]
────────────────────────────────────────────────────────────────────────────────
Skip ('test_saemix_parent.R:143'): We can also use mkin solution methods for saem
Reason: This still takes almost 2.5 minutes although we do not solve ODEs
────────────────────────────────────────────────────────────────────────────────
-✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.4s]
+✔ | 2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.6s]
✔ | 11 | Processing of residue series
-✔ | 10 | Fitting the SFORB model [3.7s]
+✔ | 10 | Fitting the SFORB model [4.2s]
✔ | 1 | Summaries of old mkinfit objects
✔ | 5 | Summary [0.2s]
-✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2s]
-✔ | 9 | Hypothesis tests [8.0s]
-✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2s]
+✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.5s]
+✔ | 9 | Hypothesis tests [9.6s]
+✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.4s]
══ Results ═════════════════════════════════════════════════════════════════════
-Duration: 211.7 s
+Duration: 245.9 s
── Skipped tests ──────────────────────────────────────────────────────────────
• Fitting this ODE model with saemix takes about 15 minutes on my system (1)
• Fitting with saemix takes around 10 minutes when using deSolve (1)
• This still takes almost 2.5 minutes although we do not solve ODEs (1)
-[ FAIL 0 | WARN 0 | SKIP 3 | PASS 267 ]
+[ FAIL 0 | WARN 0 | SKIP 3 | PASS 269 ]
diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R
index c1a10d10..5803b62c 100644
--- a/tests/testthat/test_multistart.R
+++ b/tests/testthat/test_multistart.R
@@ -9,7 +9,12 @@ test_that("multistart works for saem.mmkin models", {
best(saem_sfo_s_multi),
test = TRUE
)
- expect_true(anova_sfo[3, "Pr(>Chisq)"] > 0.5)
+ # On winbuilder, sfo_saem_1 gives an AIC of 1310.8, while we get 1311.7
+ # locally on Linux and Windows. The other, well-determined fits
+ # both give 1309.7
+ expect_equal(round(anova_sfo, 1)["sfo_saem_1_reduced", "AIC"], 1309.7)
+ expect_equal(round(anova_sfo, 1)["best(saem_sfo_s_multi)", "AIC"], 1309.7)
+ expect_true(anova_sfo[3, "Pr(>Chisq)"] > 0.2) # Local: 1, CRAN: 0.4
skip_on_cran() # Save CRAN time
set.seed(123456)

Contact - Imprint