Skip to content

Commit

Permalink
use case_weights in denom
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Jul 18, 2023
1 parent c466388 commit 7f49ecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/surv-roc_curve_survival.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ roc_curve_survival_impl_one <- function(event_time, delta, data, case_weights) {
n <- nrow(data)
multiplier <- delta / (n * data$.weight_censored)

sensitivity_denom <- sum(obs_time_le_time * multiplier, na.rm = TRUE)
specificity_denom <- sum(obs_time_gt_time, na.rm = TRUE)
sensitivity_denom <- sum(obs_time_le_time * multiplier * x$case_weights, na.rm = TRUE)
specificity_denom <- sum(obs_time_gt_time * x$case_weights, na.rm = TRUE)

data_df <- data.frame(
le_time = obs_time_le_time,
Expand Down

0 comments on commit 7f49ecf

Please sign in to comment.