Skip to content

Commit

Permalink
support for glmtoolbox::glmgee() models
Browse files Browse the repository at this point in the history
fix #274
  • Loading branch information
larmarange committed Dec 27, 2024
1 parent fd43a26 commit 93b08a7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Suggests:
ggeffects (>= 1.3.2),
ggstats (>= 0.2.1),
glmmTMB,
glmtoolbox,
glue,
gt,
gtsummary (>= 2.0.0),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# broom.helpers (development version)

**New supported models**

- support for `glmtoolbox::glmgee()` models (#274)

**New features**

- support of instrumental variables for `fixest` models (#279)
Expand Down
3 changes: 2 additions & 1 deletion data-raw/DATASET.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ supported_models <-
"`pscl::zeroinfl()`", "Use `tidy_zeroinfl()` as `tidy_fun`.",
"`pscl::hurdle()`", "Use `tidy_zeroinfl()` as `tidy_fun`.",
"`betareg::betareg()`", "Use `tidy_parameters()` as `tidy_fun` with `component` argument to control with coefficients to return. `broom::tidy()` does not support the `exponentiate` argument for betareg models, use `tidy_parameters()` instead.", # nolint
"`survival::cch()`", "`Experimental support."
"`survival::cch()`", "`Experimental support.",
"`glmtoolbox::glmgee()`", "",
) |>
dplyr::arrange(.data$model, .locale = "en")

Expand Down
Binary file modified data/supported_models.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion man/supported_models.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tests/testthat/test-tidy_plus_plus.R
Original file line number Diff line number Diff line change
Expand Up @@ -979,3 +979,23 @@ test_that("tidy_post_fun argument of `tidy_plus_plus()`", {

# test for survival::cch() not working, model.frame() not working
# in the test_that environment for this type of model

test_that("tidy_plus_plus() works with glmtoolbox::glmgee() models", {
skip_on_cran()
skip_if_not_installed("glmtoolbox")

data("spruces", package = "glmtoolbox")

mod <- glmtoolbox::glmgee(
size ~ poly(days,4) + treat,

Check warning on line 990 in tests/testthat/test-tidy_plus_plus.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test-tidy_plus_plus.R,line=990,col=22,[commas_linter] Commas should always have a space after.
id = tree,
family = Gamma(log),
corstr = "AR-M-dependent(1)",
data = spruces
)
expect_error(
res <- mod |> tidy_plus_plus(),
NA
)
expect_equal(nrow(res), 6)
})

0 comments on commit 93b08a7

Please sign in to comment.