Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 21, 2023
1 parent cf72bb5 commit 959ce85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-r2.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ test_that("r2 glmmTMB, no ranef", {
m <- glmmTMB::glmmTMB(NegPerChick ~ BroodSize + ArrivalTime, data = Owls)
out <- r2(m)
expect_equal(out$R2, 0.05597288, tolerance = 1e-3, ignore_attr = TRUE)
# validate against lm
m2 <- lm(NegPerChick ~ BroodSize + ArrivalTime, data = Owls)
out2 <- r2(m2)
expect_equal(out$R2, out2$R2, tolerance = 1e-3, ignore_attr = TRUE)
})

0 comments on commit 959ce85

Please sign in to comment.