Skip to content

Commit

Permalink
minor test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc committed Nov 24, 2023
1 parent f82314d commit 9759f2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rbmi
Title: Reference Based Multiple Imputation
Version: 1.2.5
Version: 1.2.6
Authors@R: c(
person("Craig", "Gower-Page", email = "[email protected]", role = c("aut", "cre")),
person("Alessandro", "Noci", email = "[email protected]", role = c("aut")),
Expand Down
17 changes: 6 additions & 11 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
## Summary of Submission

This version (v1.2.5) is a re-submission of v1.2.4 with some minor tweaks to fix unexpected NOTEs raised by CRANs automated checks on the v1.2.4 versions. The cran-comments.md file for (failed) v1.2.4 submission is pasted below:

In this version I have:

* Updated our Stan syntax to ensure future compatibility
* Updated our package description to contain relevant references
* Fixed several typos in our documentation
This version (v1.2.6) adjusts our unit tests to fix a false positive test failure on CRANs
Clang Fedora/Debian servers.

## R CMD check results

Expand All @@ -33,11 +28,11 @@ There were 2 NOTEs:

The package was tested in the following environments:

- MacOS, R release (Local Machine)
- Fedora, R devel (Local Machine via Docker & Rhub)
- Debian, R release (Local Machine via Docker)
- Windows, R release (Win-Builder)
- Ubuntu, R release (GitHub Actions)
- Windows, R release (Local Machine + Rhub + Win-Builder)
- MacOS, R release (Local Machine + GitHub Actions)
- Ubuntu, R devel (GitHub Actions)
- Fedora, R devel (Rhub)

## Downstream dependencies

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-fullusage.R
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ test_that("Three arms trial runs smoothly and gives expected results", {
}

set.seed(101)
bign <- 30
bign <- 40
sigma <- as_vcov(c(2, 1, 0.7), c(0.5, 0.3, 0.2))
nsamp <- 0

Expand Down
16 changes: 5 additions & 11 deletions tests/testthat/test-mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,15 @@ test_mmrm_numeric <- function(dat, formula_expr, same_cov, scale = FALSE) {
)

fit_expected <- extract_test_fit(mod)

if (scale) {
expect_true(all(
abs(fit_actual$beta - fit_expected$beta) < 0.001
))

limit_a <- fit_expected$sigma[["A"]] - (fit_expected$sigma[["A"]] * 0.99)
limit_b <- fit_expected$sigma[["B"]] - (fit_expected$sigma[["B"]] * 0.99)

expect_true(all(
abs(fit_actual$sigma[["A"]] - fit_expected$sigma[["A"]]) < limit_a
abs(fit_actual$sigma[["A"]] - fit_expected$sigma[["A"]]) < 0.01
))

expect_true(all(
abs(fit_actual$sigma[["B"]] - fit_expected$sigma[["B"]]) < limit_b
abs(fit_actual$sigma[["B"]] - fit_expected$sigma[["B"]]) < 0.01
))

} else {
Expand Down Expand Up @@ -336,14 +330,14 @@ test_that("MMRM returns expected estimates under different model specifications"

testthat::skip_on_cran()

set.seed(101)
set.seed(4101)

sigma <- as_vcov(c(5, 3, 8), c(0.4, 0.6, 0.3))

dat <- ife(
is_full_test(),
get_sim_data(n = 150, sigma),
get_sim_data(n = 50, sigma)
get_sim_data(n = 200, sigma),
get_sim_data(n = 100, sigma)
)

dat <- dat %>%
Expand Down

0 comments on commit 9759f2a

Please sign in to comment.