diff --git a/DESCRIPTION b/DESCRIPTION index fc72c6fa1..cbe8da2cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -95,7 +95,7 @@ Suggests: lavaan, lme4, logspline (>= 2.1.21), - marginaleffects (>= 0.21.0), + marginaleffects (>= 0.24.0), MASS, mclust, mediation, diff --git a/R/utils.R b/R/utils.R index e8aa83116..9bf719549 100644 --- a/R/utils.R +++ b/R/utils.R @@ -293,8 +293,8 @@ #' @keywords internal .get_marginaleffects_draws <- function(object) { # errors and checks are handled by marginaleffects - insight::check_if_installed("marginaleffects") - data.frame(marginaleffects::posterior_draws(object, shape = "DxP")) + insight::check_if_installed("marginaleffects", minimum_version = "0.24.0") + data.frame(marginaleffects::get_draws(object, shape = "DxP")) } #' @keywords internal diff --git a/tests/testthat/test-marginaleffects.R b/tests/testthat/test-marginaleffects.R index a49c16f4d..8fb654499 100644 --- a/tests/testthat/test-marginaleffects.R +++ b/tests/testthat/test-marginaleffects.R @@ -1,7 +1,7 @@ skip_on_cran() skip_if_not_installed("withr") skip_if_not_installed("rstanarm") -skip_if_not_installed("marginaleffects") +skip_if_not_installed("marginaleffects", minimum_version = "0.24.0") skip_if_not_installed("collapse") withr::with_environment(