Skip to content

Commit

Permalink
use marginaleffects::get_draws
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Dec 12, 2024
1 parent a69d91b commit 32136f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Suggests:
lavaan,
lme4,
logspline (>= 2.1.21),
marginaleffects (>= 0.21.0),
marginaleffects (>= 0.24.0),
MASS,
mclust,
mediation,
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-marginaleffects.R
Original file line number Diff line number Diff line change
@@ -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(
Expand Down

0 comments on commit 32136f0

Please sign in to comment.