Skip to content

Commit

Permalink
marginaleffects::marginal_means deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Feb 5, 2024
1 parent 9e2bb40 commit 3e666dc
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 134 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.3.0
Config/testthat/edition: 3
Config/testthat/parallel: true
Roxygen: list(markdown = TRUE)
Expand Down
12 changes: 3 additions & 9 deletions R/estimate_means.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#'
#' @inheritParams get_emmeans
#' @inheritParams parameters::model_parameters.default
#' @param backend Whether to use 'emmeans' or 'marginaleffects' as a backend.
#' The latter is experimental and some features might not work.
#' @inherit estimate_slopes details
#'
#' @examplesIf require("emmeans", quietly = TRUE)
Expand Down Expand Up @@ -51,10 +49,10 @@ estimate_means <- function(model,
fixed = NULL,
transform = "response",
ci = 0.95,
backend = "emmeans",
# backend = "emmeans",

Check warning on line 52 in R/estimate_means.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/estimate_means.R,line=52,col=30,[commented_code_linter] Remove commented code.

Check warning on line 52 in R/estimate_means.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/estimate_means.R,line=52,col=30,[commented_code_linter] Remove commented code.
...) {
# Compute means
if (backend == "emmeans") {
# if (backend == "emmeans") {
estimated <- get_emmeans(model, at, fixed, transform = transform, ...)

# Summarize and clean
Expand All @@ -72,11 +70,7 @@ estimate_means <- function(model,
means <- means[names(means) != "1"]

info <- attributes(estimated)
} else {
means <- .get_marginalmeans(model, at, fixed, transform = transform, ...)

info <- attributes(means)
}
# }

# Restore factor levels
means <- datawizard::data_restoretype(means, insight::get_data(model))
Expand Down
65 changes: 0 additions & 65 deletions R/get_marginalcontrasts.R

This file was deleted.

42 changes: 0 additions & 42 deletions R/get_marginalmeans.R

This file was deleted.

4 changes: 0 additions & 4 deletions man/estimate_means.Rd

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

1 change: 0 additions & 1 deletion man/modelbased-package.Rd

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

12 changes: 0 additions & 12 deletions tests/testthat/test-get_marginalmeans.R

This file was deleted.

0 comments on commit 3e666dc

Please sign in to comment.