Skip to content

Commit

Permalink
explicitly sort time
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc committed Jun 21, 2024
1 parent 8b24a7e commit 22b4a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/brier_score.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ reverse_km_cen_first <- function(t, times, events) {
survival::Surv(times, cen_events) ~ 1,
data = dat
)
preds <- summary(mod, times = t, extend = TRUE)$surv
preds <- summary(mod, times = t[order(t)], extend = TRUE)$surv

assert_that(
length(preds) == length(t)
Expand Down

0 comments on commit 22b4a78

Please sign in to comment.