Debian Codegraph @

tests/testthat/test-geepack.R

raw
1 skip_on_cran()
2
3 skip_if_not_installed("modeltests")
4 library(modeltests)
5
6 skip_if_not_installed("geepack")
7 suppressPackageStartupMessages(library(geepack))
8
9 dat <- data.frame(state.region, state.x77)
10
11 fit <- geeglm(
12 Income ~ Frost + Murder,
13 id = state.region,
14 data = dat,
15 corstr = "exchangeable"
16 )
17
18 test_that("tidy.geeglm", {
19 check_arguments(tidy.geeglm)
20
21 td <- tidy(fit, conf.int = TRUE)
22
23 expect_snapshot({
24 td2 <- tidy(fit, conf.int = FALSE, exponentiate = TRUE)
25 })
26
27 check_tidy_output(td)
28 check_tidy_output(td2)
29 })
30
31 test_that("glance.geeglm", {
32 gl <- glance(fit)
33 check_glance_outputs(gl)
34 })