tests/testthat/test-polr.R

skip_if_not_installed("MASS")
skip_on_cran()

test_that("robust-se polr", {
  data(housing, package = "MASS")
  m <- MASS::polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
  out <- model_parameters(m)
  expect_identical(attributes(out)$coefficient_name, "Log-Odds")
  m <- MASS::polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing, method = "probit")
  out <- model_parameters(m)
  expect_identical(attributes(out)$coefficient_name, "Coefficient")
})

Try the parameters package in your browser

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

parameters documentation built on April 4, 2025, 3:16 a.m.