Nothing
test_that("tidy_remove_intercept() works for basic models", {
mod <- glm(response ~ stage + grade + trt, gtsummary::trial, family = binomial)
res <- mod %>%
tidy_and_attach() %>%
tidy_remove_intercept()
expect_equal(
res %>% dplyr::filter(var_type == "intercept") %>% nrow(),
0L
)
})
test_that("test tidy_remove_intercept() checks", {
mod <- glm(response ~ stage + grade + trt, gtsummary::trial, family = binomial)
# expect an error if no model attached
expect_error(mod %>% broom::tidy() %>% tidy_remove_intercept())
# could be apply twice (no error)
expect_error(
mod %>% tidy_and_attach() %>% tidy_remove_intercept() %>% tidy_remove_intercept(),
NA
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.