Debian Codegraph @

tests/testthat/test-mass-ridgelm.R

raw
1 skip_on_cran()
2
3 skip_if_not_installed("modeltests")
4 library(modeltests)
5
6 skip_if_not_installed("MASS")
7
8 names(longley)[1] <- "y"
9 fit2 <- MASS::lm.ridge(y ~ ., longley)
10 fit3 <- MASS::lm.ridge(y ~ ., longley, lambda = seq(0.001, .05, .001))
11
12 test_that("MASS::lm.ridge tidier arguments", {
13 check_arguments(tidy.ridgelm)
14 check_arguments(glance.ridgelm)
15 })
16
17 test_that("tidy.ridgelm", {
18 td2 <- tidy(fit2)
19 td3 <- tidy(fit3)
20
21 check_tidy_output(td2)
22 check_tidy_output(td3)
23 })
24
25 test_that("glance.ridgelm", {
26 gl2 <- glance(fit2)
27 gl3 <- glance(fit3)
28 check_glance_outputs(gl2, gl3)
29 })