tests/testthat/test-n_parameters_rank-deficiency.R

m <- lm(formula = wt ~ am * cyl * vs, data = mtcars)

test_that("n_parameters-rank_deficiency", {
  expect_equal(n_parameters(m), 8)
  expect_equal(n_parameters(m, remove_nonestimable = TRUE), m$rank)
})

Try the insight package in your browser

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

insight documentation built on Nov. 26, 2023, 5:08 p.m.