Skip to content

Commit

Permalink
Fix marginal_effects() for single target pop with survival outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
dmphillippo committed Jul 4, 2024
1 parent fb6915a commit 05fbd6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: multinma
Title: Bayesian Network Meta-Analysis of Individual and Aggregate Data
Version: 0.7.1.9001
Version: 0.7.1.9002
Authors@R:
person(given = c("David", "M."),
family = "Phillippo",
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Fix: Predictions for non-proportional hazards IPD NMA or ML-NMR survival
models using `aux_regression = ~.trt` were incorrectly omitting the treatment
effects on the auxiliary parameter(s) in some cases (#43).
* Fix: Calling `marginal_effects()` for survival outcomes with a single target
population previously gave an error.

# multinma 0.7.1

Expand Down
2 changes: 1 addition & 1 deletion R/marginal_effects.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ marginal_effects <- function(object,
vars <- intersect(c(".study", ".time", ".quantile", ".category"), colnames(pred_meta))

if (".time" %in% vars) {
pred_meta <- dplyr::group_by(pred_meta, .data$.study, .data$.trt) %>%
pred_meta <- { if (".study" %in% vars) dplyr::group_by(pred_meta, .data$.study, .data$.trt) else dplyr::group_by(pred_meta, .data$.trt) } %>%
dplyr::mutate(.time_id = 1:dplyr::n()) %>%
dplyr::ungroup()

Expand Down

0 comments on commit 05fbd6e

Please sign in to comment.