Skip to content

Commit

Permalink
This hack should not be necessary now that issue #25 is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
xrobin committed Apr 27, 2018
1 parent 2d93f18 commit 37355e2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions R/delong.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,7 @@ delongPlacements <- function(roc) {
auc <- 1 - auc
}
if (! isTRUE(all.equal(placements$theta, auc))) {
# Sometimes we set percent <- FALSE but it is actually true
# Ideally this should be fixed in the code so that percent is always correct,
# but theta is unlikely to be off by a factor 100 exactly,
# so this should do as a quick hack
if (! isTRUE(all.equal(placements$theta, auc / 100))) {
stop(sprintf("A problem occured while calculating DeLong's theta: got %.20f instead of %.20f. This is a bug in pROC, please report it to the maintainer.", placements$theta, auc))
}
stop(sprintf("A problem occured while calculating DeLong's theta: got %.20f instead of %.20f. This is a bug in pROC, please report it to the maintainer.", placements$theta, auc))
}

return(placements)
Expand Down

0 comments on commit 37355e2

Please sign in to comment.