tests/testthat/test-polr.R

skip_on_cran()
skip_if_not_installed("MASS")

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, "Z-Score")
})

Try the parameters package in your browser

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

parameters documentation built on Nov. 25, 2025, 5:06 p.m.