Skip to content

Commit

Permalink
Merge pull request #155 from sfcheung/devel
Browse files Browse the repository at this point in the history
0.10.3.5: Update a few tests
  • Loading branch information
sfcheung authored Oct 23, 2023
2 parents 68fcd83 + 70180ed commit 50e11a0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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)
- Added an R CMD check for noSuggests. (0.10.3.2)
- 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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- badges: end -->

(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 <img src="man/figures/logo.png" align="right" height="150" />

Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-ci_bound_wn_i_mg_rb_ustd_pa_user.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down

0 comments on commit 50e11a0

Please sign in to comment.