Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drizopoulos committed Jun 5, 2024
1 parent 0a06c5c commit a7952c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/accuracy_measures.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ print.tvROC <- function (x, digits = 4, ...) {
if (x$type_weights == "IPCW") "inverse probability of censoring Kaplan-Meier weights\n\n"
else "model-based weights\n\n", sep = "")
d <- data.frame("cut-off" = x$thrs, "SN" = x$TP, "SP" = 1 - x$FP,
"qSN" = x$qSN, "qSP" = x$qSP, check.names = FALSE,
check.rows = FALSE)
check.names = FALSE, check.rows = FALSE)
xx <- rep("", nrow(d))
xx[which.min(abs(x$thr - x$Youden))] <- "*"
d[[" "]] <- xx
d <- d[!is.na(d$qSN) & !is.na(d$qSP), ]
d <- d[!is.na(d$SN) & !is.na(d$SP), ]
d <- d[!duplicated(d[c("SN", "SP")]), ]
row.names(d) <- 1:nrow(d)
print(d, digits = digits)
Expand Down

0 comments on commit a7952c9

Please sign in to comment.