Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 12, 2024
1 parent d2ac180 commit d06f812
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/testthat/test-r2_nakagawa_ordered_beta.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ withr::with_environment(
data = sleepstudy,
family = glmmTMB::ordbeta()
)
out <- suppressWarnings(performance::r2_nakagawa(m, verbose = FALSE))
mnull <- glmmTMB::glmmTMB(
y ~ 1 + (Days | Subject),
data = sleepstudy,
family = glmmTMB::ordbeta()
)
out <- suppressWarnings(performance::r2_nakagawa(m, null_model = mnull, verbose = FALSE))
expect_equal(out$R2_marginal, 0.2799715, ignore_attr = TRUE, tolerance = 1e-4)
expect_equal(out$R2_conditional, 0.8504158, ignore_attr = TRUE, tolerance = 1e-4)
})
Expand Down

0 comments on commit d06f812

Please sign in to comment.