diff options
Diffstat (limited to 'tests/testthat/test_multinomPois.R')
-rw-r--r-- | tests/testthat/test_multinomPois.R | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/testthat/test_multinomPois.R b/tests/testthat/test_multinomPois.R index 6b4b693..1103839 100644 --- a/tests/testthat/test_multinomPois.R +++ b/tests/testthat/test_multinomPois.R @@ -101,9 +101,14 @@ test_that("multinomPois can fit a removal model",{ res <- residuals(m2_C) expect_equal(dim(res), dim(umf1@y)) - expect_warning(r <- ranef(m2_C)) - expect_equal(dim(r@post), c(3,56,1)) - expect_equal(bup(r), c(10.794,0.000,2.655), tol=1e-4) + expect_warning(r <- ranef(m2_C, K=50)) + expect_equal(dim(r@post), c(3,51,1)) + expect_equal(bup(r), c(10.794,6.9317,2.655), tol=1e-4) + + umf2 <- unmarkedFrameMPois(y=y, siteCovs=data.frame(x1=rnorm(5)), type="removal") + m4 <- multinomPois(~1~x1, umf2) + r <- ranef(m4, K=30) + expect_equal(dim(r@post), c(5,31,1)) expect_warning(s <- simulate(m2_C, 2, na.rm=FALSE)) expect_equal(length(s), 2) |