1
# pROC: Tools Receiver operating characteristic (ROC curves) with
2
# (partial) area under the curve, confidence intervals and comparison. 
3
# Copyright (C) 2014 Xavier Robin
4
#
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17

18
Ops.auc <- function(e1, e2) {
19 33
  if (methods::is(e1, "auc"))
20 33
    attributes(e1) <- NULL
21 33
  if (methods::is(e2, "auc"))
22 33
   attributes(e2) <- NULL
23 33
  NextMethod()
24
}
25

26
Math.auc <- function(x, ...) {
27 33
  attributes(x) <- NULL
28 33
  NextMethod()
29
}
30

31
Ops.ci.se <- Ops.ci.sp <- Ops.ci.auc <- function(e1, e2) {
32 33
  e1 <- remove.ci.attributes(e1)
33 33
  e2 <- remove.ci.attributes(e2)
34 33
  NextMethod()
35
}
36

37

38
Math.ci.se <- Math.ci.sp <- Math.ci.auc <- function(x, ...) {
39 33
  x <- remove.ci.attributes(x)
40 33
  NextMethod()
41
}
42

43
remove.ci.attributes <- function(ci) {
44 33
  attr(ci, "conf.level") <- NULL
45 33
  attr(ci, "boot.n") <- NULL
46 33
  attr(ci, "boot.stratified") <- NULL
47 33
  attr(ci, "specificities") <- NULL
48 33
  attr(ci, "sensitivities") <- NULL
49 33
  attr(ci, "roc") <- NULL
50 33
  attr(ci, "method") <- NULL
51 33
  attr(ci, "auc") <- NULL
52 33
  class(ci) <- class(ci)[-(1:2)]
53 33
  return(ci)
54
}

Read our documentation on viewing source code .

Loading