diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2021-02-06 09:46:53 +0100 | 
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-02-06 09:46:53 +0100 | 
| commit | 2ee20b257e34210e2d1f044431f3bfe059c9c5e7 (patch) | |
| tree | 53ecb4e0307362ebf848fac4a50c9adf90bf3afc | |
| parent | 5c2b184748abd5002e79d7e86c2764613f96d97e (diff) | |
Increase test tolerance for parameter comparisonsv1.0.1
Platform dependence also revealed after upgrade to bullseye
| -rw-r--r-- | NEWS.md | 2 | ||||
| -rw-r--r-- | docs/news/index.html | 1 | ||||
| -rw-r--r-- | docs/pkgdown.yml | 2 | ||||
| -rw-r--r-- | test.log | 20 | ||||
| -rw-r--r-- | tests/testthat/test_error_models.R | 8 | 
5 files changed, 18 insertions, 15 deletions
| @@ -8,6 +8,8 @@  - Remove tests relying on non-convergence of the FOMC fit to the FOCUS A dataset as this is platform dependent (revealed by the new additional tests on CRAN, thanks!) +- Increase test tolerance for some parameter comparisons that also proved to be platform dependent +  # mkin 1.0.0  ## General diff --git a/docs/news/index.html b/docs/news/index.html index c568202b..5b24742f 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -150,6 +150,7 @@  <li><p>‘logLik.mkinfit’: Improve example code to avoid warnings and show convenient syntax</p></li>  <li><p>‘mkinresplot’: Re-add Katrin Lindenberger as coauthor who was accidentally removed long ago</p></li>  <li><p>Remove tests relying on non-convergence of the FOMC fit to the FOCUS A dataset as this is platform dependent (revealed by the new additional tests on CRAN, thanks!)</p></li> +<li><p>Increase test tolerance for some parameter comparisons that also proved to be platform dependent</p></li>  </ul>  </div>      <div id="mkin-100" class="section level1"> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 463d6e59..4100aea3 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles:    web_only/NAFTA_examples: NAFTA_examples.html    web_only/benchmarks: benchmarks.html    web_only/compiled_models: compiled_models.html -last_built: 2021-02-06T08:30Z +last_built: 2021-02-06T08:46Z  urls:    reference: https://pkgdown.jrwb.de/mkin/reference    article: https://pkgdown.jrwb.de/mkin/articles @@ -6,11 +6,11 @@ Testing mkin  ✔ |   2       | Export dataset for reading into CAKE  ✔ |  14       | Results for FOCUS D established in expertise for UBA (Ranke 2014) [1.0 s]  ✔ |   4       | Calculation of FOCUS chi2 error levels [0.5 s] -✔ |   7       | Fitting the SFORB model [3.5 s] +✔ |   7       | Fitting the SFORB model [3.4 s]  ✔ |   5       | Analytical solutions for coupled models [3.3 s]  ✔ |   5       | Calculation of Akaike weights -✔ |  14       | Confidence intervals and p-values [1.2 s] -✔ |  14       | Error model fitting [4.4 s] +✔ |  12       | Confidence intervals and p-values [1.0 s] +✔ |  14       | Error model fitting [4.2 s]  ✔ |   5       | Time step normalisation  ✔ |   4       | Test fitting the decline of metabolites from their maximum [0.3 s]  ✔ |   1       | Fitting the logistic model [0.2 s] @@ -19,19 +19,19 @@ Testing mkin  ✔ |   1       | mkinfit features [0.3 s]  ✔ |  10       | Special cases of mkinfit calls [0.3 s]  ✔ |   8       | mkinmod model generation and printing [0.2 s] -✔ |   3       | Model predictions with mkinpredict [0.4 s] +✔ |   3       | Model predictions with mkinpredict [0.3 s]  ✔ |  16       | Evaluations according to 2015 NAFTA guidance [1.6 s] -✔ |   9       | Nonlinear mixed-effects models [7.8 s] +✔ |   9       | Nonlinear mixed-effects models [8.0 s]  ✔ |  14       | Plotting [1.7 s]  ✔ |   4       | Residuals extracted from mkinfit models  ✔ |   2       | Complex test case from Schaefer et al. (2007) Piacenza paper [1.5 s]  ✔ |   4       | Summary [0.1 s]  ✔ |   1       | Summaries of old mkinfit objects -✔ |   4       | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.3 s] -✔ |   9       | Hypothesis tests [7.2 s] -✔ |   4       | Calculation of maximum time weighted average concentrations (TWAs) [2.4 s] +✔ |   4       | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2 s] +✔ |   9       | Hypothesis tests [8.1 s] +✔ |   4       | Calculation of maximum time weighted average concentrations (TWAs) [2.6 s]  ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 40.6 s +Duration: 41.3 s -[ FAIL 0 | WARN 0 | SKIP 0 | PASS 176 ] +[ FAIL 0 | WARN 0 | SKIP 0 | PASS 174 ] diff --git a/tests/testthat/test_error_models.R b/tests/testthat/test_error_models.R index c11f6712..fee29d2c 100644 --- a/tests/testthat/test_error_models.R +++ b/tests/testthat/test_error_models.R @@ -33,22 +33,22 @@ test_that("The different error model fitting methods work for parent fits", {    f_9_threestep <- mkinfit("SFO", test_9,      error_model = "tc", error_model_algorithm = "threestep", quiet = TRUE)    expect_equivalent(round(AIC(f_9_threestep), 2), 139.43) -  expect_equivalent(parms(f_9_threestep)[1:3], f_9_parms_const) +  expect_equivalent(parms(f_9_threestep)[1:3], f_9_parms_const, tolerance = 1e-5)    f_9_fourstep <- mkinfit("SFO", test_9,      error_model = "tc", error_model_algorithm = "fourstep", quiet = TRUE)    expect_equivalent(round(AIC(f_9_fourstep), 2), 139.43) -  expect_equivalent(parms(f_9_fourstep)[1:3], f_9_parms_const) +  expect_equivalent(parms(f_9_fourstep)[1:3], f_9_parms_const, tolerance = 1e-5)    f_9_IRLS <- mkinfit("SFO", test_9,      error_model = "tc", error_model_algorithm = "IRLS", quiet = TRUE)    expect_equivalent(round(AIC(f_9_IRLS), 2), 139.43) -  expect_equivalent(parms(f_9_IRLS)[1:3], f_9_parms_const) +  expect_equivalent(parms(f_9_IRLS)[1:3], f_9_parms_const, tolerance = 1e-5)    f_9_d_3 <- mkinfit("SFO", test_9,      error_model = "tc", error_model_algorithm = "d_3", quiet = TRUE)    expect_equivalent(round(AIC(f_9_d_3), 2), 134.94) -  expect_equivalent(parms(f_9_d_3), f_9_parms_tc_direct) +  expect_equivalent(parms(f_9_d_3), f_9_parms_tc_direct, tolerance = 1e-5)  })  test_that("The default error model algorithm finds the best known AIC values for parent fits", { | 
