Skip to content

Commit

Permalink
remove redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 15, 2024
1 parent cd3682f commit 53ebb09
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/testthat/test-estimate_means.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,3 @@ test_that("estimate_means() - mixed models", {
out2 <- estimate_means(m, c("mined", "spp"))
expect_equal(out1$Mean[order(out1$spp)], out2$rate, tolerance = 1e-3)
})


test_that("Test against other packages", {
skip_if_not_installed("emmeans")

dat <- mtcars
dat$gear <- as.factor(dat$gear)
dat$cyl <- as.factor(dat$cyl)
dat <<- dat

# Simple
model <- lm(vs ~ cyl, data = dat)
rez <- suppressMessages(estimate_means(model, backend = "marginaleffects"))
rez_emmeans <- emmeans::emmeans(model, "cyl")

# TODO: estimate_means reorders factors based on datagrid?
# expect_lt(max(rez$Mean - as.data.frame(rez_emmeans)$emmean), 1e-10)
})

0 comments on commit 53ebb09

Please sign in to comment.