tests/testthat/test-linktest.R

test_that("output from blr_linktest is as expected", {

   model <- glm(
    honcomp ~ female + read + science, data = hsb2,
    family = binomial(link = "logit")
  )

  actual   <- round(unname(blr_linktest(model)$coefficients[, 1]), 2)
  expected <- c(0.04, 0.94, -0.04)
  expect_equal(actual, expected)
})

Try the blorr package in your browser

Any scripts or data that you put into this service are public.

blorr documentation built on April 3, 2025, 6:01 p.m.