tests/testthat/test-r2_coxsnell.R

test_that("r2_coxsnell", {
  model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
  expect_equal(r2_coxsnell(model), c(`Cox & Snell's R2` = 0.440140715155838), tolerance = 1e-3)
})
easystats/performance documentation built on March 4, 2025, 7:10 p.m.