| 1 |
skip_on_cran() |
| 2 |
|
| 3 |
skip_if_not_installed("modeltests") |
| 4 |
library(modeltests) |
| 5 |
|
| 6 |
skip_if_not_installed("gam") |
| 7 |
|
| 8 |
data(kyphosis, package = "gam") |
| 9 |
fit <- gam::gam( |
| 10 |
Kyphosis ~ gam::s(Age, 4) + Number, |
| 11 |
family = binomial, |
| 12 |
data = kyphosis |
| 13 |
) |
| 14 |
|
| 15 |
test_that("gam::gam tidier arguments", { |
| 16 |
check_arguments(tidy.Gam) |
| 17 |
check_arguments(glance.Gam) |
| 18 |
}) |
| 19 |
|
| 20 |
test_that("tidy.Gam", { |
| 21 |
td <- tidy(fit) |
| 22 |
check_tidy_output(td) |
| 23 |
check_dims(td, 3, 6) |
| 24 |
}) |
| 25 |
|
| 26 |
test_that("glance.Gam", { |
| 27 |
gl <- glance(fit) |
| 28 |
check_glance_outputs(gl) |
| 29 |
}) |