Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block glm tidiers for gee objects. Fixes #708.
- Loading branch information
1 parent
c07371e
commit ce212e7
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,7 +355,7 @@ Suggests: | |
survey, | ||
survival, | ||
systemfit, | ||
testthat, | ||
testthat (>= 2.1.0), | ||
tseries, | ||
xergm, | ||
zoo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# mclogit subclasses glm, make sure to stop rather than erroneously | ||
# use the glm tidiers | ||
|
||
#' @export | ||
tidy.gee <- tidy.default | ||
|
||
#' @export | ||
glance.gee <- glance.default | ||
|
||
#' @export | ||
augment.gee <- augment.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
skip_if_not_installed("gee") | ||
library(gee) | ||
|
||
skip_if_not_installed("MASS") | ||
library(MASS) | ||
|
||
data(OME) | ||
|
||
capture.output( # hack to prevent C level printing that can't be turned off | ||
mod <- gee( | ||
cbind(Correct, Trials - Correct) ~ Loud + Age + OME, | ||
id = ID, | ||
data = OME, | ||
family = binomial, | ||
corstr = "exchangeable", | ||
silent = TRUE | ||
) | ||
) | ||
|
||
test_that("tidy.glm() isn't invoked", { | ||
expect_error( | ||
tidy(mod), | ||
"No tidy method for objects of class gee" | ||
) | ||
}) | ||
|
||
test_that("glance.glm() isn't invoked", { | ||
expect_error( | ||
glance(mod), | ||
"No glance method for objects of class gee" | ||
) | ||
}) | ||
|
||
test_that("augment.glm() isn't invoked", { | ||
expect_error( | ||
augment(mod), | ||
"No augment method for objects of class gee" | ||
) | ||
}) | ||
|
||
rm(mod) |