tests/testthat/test-score-output.R

test_that("when fitted.values == TRUE, fitted values from the regression\n\tare used for the test", {
  model <- lm(mpg ~ disp + hp + wt + drat + qsec, data = mtcars)
  expect_snapshot(ols_test_score(model))
  expect_snapshot(ols_test_score(model, rhs = TRUE))
  expect_snapshot(ols_test_score(model, vars = c("disp", "hp")))
  expect_snapshot(ols_test_score(model, rhs = TRUE, vars = c("disp", "hp")))
})

Try the olsrr package in your browser

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

olsrr documentation built on May 29, 2024, 12:35 p.m.