revdep/checks/olsrr/old/olsrr.Rcheck/tests/testthat/test-stepaic-both-output.R

test_that("output from stepAIC both direction regression is as expected when adding and removing variables", {
  model <- lm(y ~ ., data = stepdata)
  expect_snapshot(ols_step_both_aic(model, progress = TRUE))
  expect_snapshot(ols_step_both_aic(model, details = TRUE))
})

test_that("output from stepSBC both direction regression is as expected when adding and removing variables", {
  model <- lm(y ~ ., data = stepdata)
  expect_snapshot(ols_step_both_sbc(model, progress = TRUE))
  expect_snapshot(ols_step_both_sbc(model, details = TRUE))
})

test_that("output from stepSBIC both direction regression is as expected when adding and removing variables", {
  model <- lm(y ~ ., data = stepdata)
  expect_snapshot(ols_step_both_sbic(model, progress = TRUE))
  expect_snapshot(ols_step_both_sbic(model, details = TRUE))
})
rsquaredacademy/xplorerr documentation built on Nov. 2, 2024, 7:33 a.m.