Skip to content

Commit

Permalink
fix for bayestestR
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 16, 2024
1 parent ed23be8 commit a690f60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: modelbased
Title: Estimation of Model-Based Predictions, Contrasts and Means
Version: 0.8.8
Version: 0.8.8.1
Authors@R:
c(person(given = "Dominique",
family = "Makowski",
Expand Down Expand Up @@ -34,11 +34,11 @@ BugReports: https://github.com/easystats/modelbased/issues
Depends:
R (>= 3.6)
Imports:
bayestestR (>= 0.13.2),
datawizard (>= 0.11.0),
bayestestR (>= 0.15.0),
datawizard (>= 0.13.0),
effectsize (>= 0.8.8),
insight (>= 0.20.0),
parameters (>= 0.21.7),
insight (>= 0.20.5),
parameters (>= 0.22.2),
performance (>= 0.12.0),
graphics,
stats,
Expand Down
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# modelbased (development version)
# modelbased 0.8.9

- Fixed issues related to updates of other *easystats* packages.

# modelbased 0.8.6

Expand Down Expand Up @@ -102,4 +104,3 @@
# modelbased 0.1.0

- Added a `NEWS.md` file to track changes to the package

8 changes: 6 additions & 2 deletions R/get_emmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ model_emmeans <- get_emmeans
if (insight::model_info(model)$is_bayesian) {
means <- parameters::parameters(estimated, ci = ci, ...)
means <- .clean_names_bayesian(means, model, transform, type = "mean")
means <- cbind(estimated@grid, means)
means[[".wgt."]] <- NULL # Drop the weight column
em_grid <- as.data.frame(estimated@grid)
em_grid[[".wgt."]] <- NULL # Drop the weight column
colums_to_add <- setdiff(colnames(em_grid), colnames(means))
if (length(colums_to_add)) {
means <- cbind(em_grid[colums_to_add], means)
}
} else {
means <- as.data.frame(stats::confint(estimated, level = ci))
means$df <- NULL
Expand Down

0 comments on commit a690f60

Please sign in to comment.