| 1 |
skip_on_cran() |
| 2 |
|
| 3 |
skip_if_not_installed("modeltests") |
| 4 |
library(modeltests) |
| 5 |
|
| 6 |
skip_if_not_installed("biglm") |
| 7 |
suppressPackageStartupMessages(library(biglm)) |
| 8 |
|
| 9 |
fit <- biglm(mpg ~ wt + disp, mtcars) |
| 10 |
fit2 <- bigglm(am ~ mpg, mtcars, family = binomial()) |
| 11 |
|
| 12 |
test_that("biglm tidier arguments", { |
| 13 |
check_arguments(tidy.biglm) |
| 14 |
check_arguments(glance.biglm) |
| 15 |
}) |
| 16 |
|
| 17 |
test_that("tidy.biglm", { |
| 18 |
td <- tidy(fit) |
| 19 |
td2 <- tidy(fit2, conf.int = TRUE, conf.level = 0.9, exponentiate = TRUE) |
| 20 |
|
| 21 |
check_tidy_output(td) |
| 22 |
check_tidy_output(td2) |
| 23 |
|
| 24 |
check_dims(td, 3, 4) |
| 25 |
}) |
| 26 |
|
| 27 |
|
| 28 |
test_that("glance.betareg", { |
| 29 |
gl <- glance(fit) |
| 30 |
check_glance_outputs(gl) |
| 31 |
|
| 32 |
gl2 <- glance(fit2) |
| 33 |
check_glance_outputs(gl2) # separate glance checks since different models |
| 34 |
}) |