Skip to content

Commit

Permalink
343: fix more tests hopefully [skip vbump] (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinteractive authored Sep 21, 2023
1 parent fb42df2 commit d2abc8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: mmrm
Title: Mixed Models for Repeated Measures
Version: 0.3.2
Version: 0.3.3
Authors@R: c(
person("Daniel", "Sabanes Bove", , "daniel.sabanes_bove@roche.com", role = c("aut", "cre")),
person("Julia", "Dedic", , "julia.dedic@roche.com", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mmrm 0.3.2
# mmrm 0.3.3

### New Features

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ test_that("mmrm works as expected for toeplitz", {
## general ----

test_that("mmrm falls back to other optimizers if default does not work", {
formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
formula <- FEV1 ~ ar1(AVISIT | USUBJID)

# Chosen optimizer does not work.
fake_optimizer <- function(par, fun, grad, ...) {
Expand Down Expand Up @@ -371,11 +371,12 @@ test_that("mmrm fails if no optimizer works", {
})

test_that("mmrm works for rank deficient original design matrix by default", {
formula <- FEV1 ~ RACE + SEX + SEX2 + ARMCD * AVISIT + us(AVISIT | USUBJID)
formula <- FEV1 ~ SEX + SEX2 + ar1(AVISIT | USUBJID)
dat <- fev_data
dat$SEX2 <- dat$SEX # nolint
result <- expect_silent(mmrm(formula, dat))
expect_true(attr(result, "converged"))
expect_true(is.na(coef(result)["SEX2Female"]))
})

test_that("mmrm works if data is not provided as argument", {
Expand Down

0 comments on commit d2abc8c

Please sign in to comment.