Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkellner committed Jul 9, 2024
1 parent 84f3dc2 commit 0f46292
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test_multmixOpen.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ test_that("multmixOpen can fit removal models",{
#Check simulate
set.seed(123)
sim <- simulate(fit, nsim=2)
expect_equivalent(sim[[1]][3,1:3], c(3,0,0))
expect_equivalent(sim[[1]][3,1:3], c(2,1,0))
expect_equivalent(dim(sim[[1]]), c(100,15))

#Check ranef
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_simulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ test_that("simulate can generate new datasets from scratch",{
forms_pco <- list(lambda=~elev, det=~1, gamma=~1, omega=~1)
umf11 <- simulate("pcountOpen", formulas=forms_pco, design=design_pco,
coefs=cf_pco, K=15)
fm <- pcountOpen(~elev, ~1, ~1, ~1, data=umf11, K=15)
expect_equivalent(coef(fm), c(1.7703,0.0427,-0.2768,0.1288,0.0245), tol=1e-4)
fm <- pcountOpen(~elev, ~1, ~1, ~1, data=umf11, K=20)
expect_equivalent(coef(fm), c(1.9240,0.4434,-0.0921,0.02209,0.1561), tol=1e-4)

#multmixOpen
set.seed(123)
Expand Down

0 comments on commit 0f46292

Please sign in to comment.