From ab79c7ff1be094a098cb6fa89d12cde934251d99 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 22 Oct 2024 12:20:17 +0200 Subject: [PATCH] update test --- tests/testthat/test-check_zeroinflation.R | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/testthat/test-check_zeroinflation.R b/tests/testthat/test-check_zeroinflation.R index 95344933d..53f8af9f5 100644 --- a/tests/testthat/test-check_zeroinflation.R +++ b/tests/testthat/test-check_zeroinflation.R @@ -111,22 +111,22 @@ test_that("check_zeroinflation, glmmTMB nbinom", { skip_if_not_installed("DHARMa") skip_on_cran() + data(Salamanders, package = "glmmTMB") + m <- glmmTMB::glmmTMB( + count ~ spp + mined + (1 | site), + family = glmmTMB::nbinom1(), + data = Salamanders + ) set.seed(1234) - dat <- DHARMa::createData(sampleSize = 1000) - fit <- suppressWarnings(glmmTMB::glmmTMB( - observedResponse ~ Environment1 + (1 | group), - data = dat, - family = glmmTMB::nbinom1() - )) expect_equal( - check_zeroinflation(fit), + check_zeroinflation(m), structure( list( - predicted.zeros = 424, - observed.zeros = 401L, - ratio = 1.05636907730673, + predicted.zeros = 389, + observed.zeros = 387L, + ratio = 1.00635658914729, tolerance = 0.1, - p.value = 0.784 + p.value = 0.944 ), class = "check_zi" ),