From 70180ed7a3f2033f0c687342cf57c50dadf6e6b4 Mon Sep 17 00:00:00 2001 From: Shu Fai Cheung Date: Mon, 23 Oct 2023 10:08:10 +0800 Subject: [PATCH] 0.10.3.5: Update a few tests Tests passed. --- DESCRIPTION | 2 +- NEWS.md | 4 ++-- README.md | 2 +- tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R | 3 ++- tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8bebe57..c631183 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: semlbci Title: Likelihood-Based Confidence Interval in Structural Equation Models -Version: 0.10.3.4 +Version: 0.10.3.5 Authors@R: c( person(given = "Shu Fai", diff --git a/NEWS.md b/NEWS.md index 977d1ea..b677651 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# semlbci 0.10.3.4 +# semlbci 0.10.3.5 - Updated README.md for CRAN release. Identical to the CRAN release in code. (0.10.3.1) @@ -6,7 +6,7 @@ - Revised an example of `syntax_to_i()` for a coming changes to the parser of `lavaan` (0.10.3.3). -- Updated a few tests (0.10.3.4). +- Updated a few tests (0.10.3.4, 0.10.3.5). # semlbci 0.10.3 diff --git a/README.md b/README.md index 38e432f..91a081e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![DOI](https://img.shields.io/badge/doi-10.1080/10705511.2023.2183860-blue.svg)](https://doi.org/10.1080/10705511.2023.2183860) -(Version 0.10.3.4, updated on 2023-10-23, [release history](https://sfcheung.github.io/semlbci/news/index.html)) +(Version 0.10.3.5, updated on 2023-10-23, [release history](https://sfcheung.github.io/semlbci/news/index.html)) # semlbci diff --git a/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R b/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R index fc9d6f1..e888789 100644 --- a/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R +++ b/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R @@ -41,8 +41,9 @@ time2l <- system.time(out2l <- ci_bound_wn_i(10, 16, sem_out = fit, f_constr = f time2u <- system.time(out2u <- ci_bound_wn_i(10, 16, sem_out = fit, f_constr = fn_constr0, which = "ubound", opts = opts0, verbose = TRUE, ciperc = ciperc, sf = sf2$c_r, sf2 = sf2$c_rb)) # 2023-10-23: Updated precomputed answers manually checked for validity. +# 2023-10-23: Tolerance updated to allow for cross-platform differences. test_that("Check against precomputed answers", { - expect_equal(out1l$bound, -0.190309, tolerance = 1e-4) + expect_equal(out1l$bound, -0.190309, tolerance = 1e-3) expect_equal(out1u$bound, 2.752005, tolerance = 1e-4) expect_equal(out2l$bound, 0.362989, tolerance = 1e-4) expect_equal(out2u$bound, 0.7840242, tolerance = 1e-4) diff --git a/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R b/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R index 8f035ee..b5a0f0e 100644 --- a/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R +++ b/tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R @@ -43,8 +43,9 @@ time1l <- system.time(out1l <- ci_bound_wn_i(1,16, sem_out = fit, f_constr = fn_ time2u <- system.time(out2u <- ci_bound_wn_i(17,16, sem_out = fit, f_constr = fn_constr0, which = "ubound", opts = opts0, verbose = TRUE, ciperc = ciperc, sf = sf2$c_r, sf2 = sf2$c_rb)) # 2023-10-23: Updated precomputed answers manually checked for validity. +# 2023-10-23: Tolerance updated to allow for cross-platform differences. test_that("Check against precomputed answers", { - expect_equal(out1l$bound, -0.190309, tolerance = 1e-4) + expect_equal(out1l$bound, -0.190309, tolerance = 1e-3) expect_equal(out2u$bound, 1.665516, tolerance = 1e-4) })