Skip to content
This repository
  • 18 commits
  • 15 files changed
  • 0 comments
  • 1 contributor
2  DESCRIPTION
@@ -4,7 +4,7 @@ Title: display and analyze ROC curves
4 4 Version: 1.5.9
5 5 Date: 2011-??-??
6 6 Encoding: UTF-8
7   -Depends: plyr, R (>= 2.10), utils
  7 +Depends: plyr, R (>= 2.10), utils, methods
8 8 Suggests: tcltk, MASS, logcondens
9 9 Author: Xavier Robin, Natacha Turck, Alexandre Hainard, Natalia Tiberti, Frédérique Lisacek, Jean-Charles Sanchez and Markus Müller
10 10 Maintainer: Xavier Robin <Xavier.Robin@unige.ch>
3  NAMESPACE
@@ -2,6 +2,7 @@ export(
2 2 are.paired, are.paired.auc, are.paired.roc, are.paired.smooth.roc,
3 3 auc, auc.formula, auc.roc, auc.smooth.roc, auc.default, auc.multiclass.roc,
4 4 ci, ci.formula, ci.default, ci.roc, ci.smooth.roc,
  5 + ci.coords, ci.coords.formula, ci.coords.default, ci.coords.roc, ci.coords.smooth.roc,
5 6 ci.thresholds, ci.thresholds.formula, ci.thresholds.default, ci.thresholds.roc, ci.thresholds.smooth.roc,
6 7 ci.sp, ci.sp.formula, ci.sp.default, ci.sp.roc, ci.sp.smooth.roc,
7 8 ci.se, ci.se.formula, ci.se.default, ci.se.roc, ci.se.smooth.roc,
@@ -20,3 +21,5 @@ export(
20 21 smooth, smooth.roc, smooth.default, smooth.smooth.roc,
21 22 var, var.default, var.auc, var.smooth.roc, var.roc
22 23 )
  24 +
  25 +import(methods, utils)
4 NEWS
... ... @@ -1,8 +1,12 @@
1 1 1.6 (201?-??-??)
2 2 * New 'power.roc.test' function for sample size and power computations
3 3 * New 'cov' and 'var' functions supports new "obuchowski" method
  4 + * New 'ci.coords' function to compute CI of arbitrary coords
4 5 * 'coords' accepts new 'ret' value "1-accuracy"
5 6
  7 +1.5.1 (2012-03-09)
  8 + * Faster loading of the package (thanks to Prof Brian Ripley and Glenn Lawyer for the report)
  9 +
6 10 1.5 (2011-12-11)
7 11 * New 'cov' and 'var' functions
8 12 * 'coords' accepts new 'ret' values: "accuracy", "tn", "tp", "fn", "fp", "npv", "ppv", "1-specificity", "1-sensitivity", "1-npv", "1-ppv", "npe" and "ppe"
96 R/bootstrap.R
@@ -591,3 +591,99 @@ nonstratified.ci.thresholds <- function(n, roc, thresholds) {
591 591
592 592 return(sapply(thresholds, roc.utils.perfs, controls=controls, cases=cases, direction=roc$direction))
593 593 }
  594 +
  595 +
  596 +########## Coords of one ROC curves (ci.coords) ##########
  597 +stratified.ci.coords <- function(roc, x, input, ret, best.method, best.weights) {
  598 + controls <- sample(roc$controls, replace=TRUE)
  599 + cases <- sample(roc$cases, replace=TRUE)
  600 + thresholds <- roc.utils.thresholds(c(cases, controls))
  601 +
  602 + perfs <- sapply(thresholds, roc.utils.perfs, controls=controls, cases=cases, direction=roc$direction)
  603 + # update ROC
  604 + roc$sensitivities <- perfs[2,]
  605 + roc$specificities <- perfs[1,]
  606 + roc$cases <- cases
  607 + roc$controls <- controls
  608 + roc$predictor <- c(controls, cases)
  609 + roc$response <- c(rep(roc$levels[1], length(controls)), rep(roc$levels[2], length(cases)))
  610 + roc$thresholds <- thresholds
  611 +
  612 + as.numeric(coords.roc(roc, x=x, input=input, ret=ret, best.method=best.method, best.weights=best.weights))
  613 +}
  614 +
  615 +nonstratified.ci.coords <- function(roc, x, input, ret, best.method, best.weights) {
  616 + tmp.idx <- sample(1:length(roc$predictor), replace=TRUE)
  617 + predictor <- roc$predictor[tmp.idx]
  618 + response <- roc$response[tmp.idx]
  619 + splitted <- split(predictor, response)
  620 + controls <- splitted[[as.character(roc$levels[1])]]
  621 + cases <- splitted[[as.character(roc$levels[2])]]
  622 + thresholds <- roc.utils.thresholds(c(controls, cases))
  623 +
  624 + perfs <- sapply(thresholds, roc.utils.perfs, controls=controls, cases=cases, direction=roc$direction)
  625 + # update ROC
  626 + roc$sensitivities <- perfs[2,]
  627 + roc$specificities <- perfs[1,]
  628 + roc$cases <- cases
  629 + roc$controls <- controls
  630 + roc$predictor <- c(controls, cases)
  631 + roc$response <- c(rep(roc$levels[1], length(controls)), rep(roc$levels[2], length(cases)))
  632 + roc$thresholds <- thresholds
  633 +
  634 + as.numeric(coords.roc(roc, x=x, input=input, ret=ret, best.method=best.method, best.weights=best.weights))
  635 +}
  636 +
  637 +########## Coords of a smooth ROC curve (ci.coords) ##########
  638 +
  639 +stratified.ci.smooth.coords <- function(roc, x, input, ret, best.method, best.weights, smooth.roc.call) {
  640 + controls <- sample(roc$controls, replace=TRUE)
  641 + cases <- sample(roc$cases, replace=TRUE)
  642 + thresholds <- roc.utils.thresholds(c(cases, controls))
  643 +
  644 + perfs <- sapply(thresholds, roc.utils.perfs, controls=controls, cases=cases, direction=roc$direction) * ifelse(roc$percent, 100, 1)
  645 +
  646 + # update ROC
  647 + roc$sensitivities <- perfs[2,]
  648 + roc$specificities <- perfs[1,]
  649 + roc$cases <- cases
  650 + roc$controls <- controls
  651 + roc$predictor <- c(controls, cases)
  652 + roc$response <- c(rep(roc$levels[1], length(controls)), rep(roc$levels[2], length(cases)))
  653 + roc$thresholds <- thresholds
  654 +
  655 + # call smooth.roc and auc.smooth.roc
  656 + smooth.roc.call$roc <- roc
  657 + smooth.roc <- try(eval(smooth.roc.call), silent=TRUE)
  658 + if (is(smooth.roc, "try-error"))
  659 + return(NA)
  660 + as.numeric(coords.roc(smooth.roc, x=x, input=input, ret=ret, best.method=best.method, best.weights=best.weights))
  661 +}
  662 +
  663 +nonstratified.ci.smooth.coords <- function(roc, x, input, ret, best.method, best.weights, smooth.roc.call) {
  664 + tmp.idx <- sample(1:length(roc$predictor), replace=TRUE)
  665 + predictor <- roc$predictor[tmp.idx]
  666 + response <- roc$response[tmp.idx]
  667 + splitted <- split(predictor, response)
  668 + controls <- splitted[[as.character(roc$levels[1])]]
  669 + cases <- splitted[[as.character(roc$levels[2])]]
  670 + thresholds <- roc.utils.thresholds(c(cases, controls))
  671 +
  672 + perfs <- sapply(thresholds, roc.utils.perfs, controls=controls, cases=cases, direction=roc$direction) * ifelse(roc$percent, 100, 1)
  673 +
  674 + # update ROC
  675 + roc$sensitivities <- perfs[2,]
  676 + roc$specificities <- perfs[1,]
  677 + roc$cases <- cases
  678 + roc$controls <- controls
  679 + roc$predictor <- predictor
  680 + roc$response <- response
  681 + roc$thresholds <- thresholds
  682 +
  683 + # call smooth.roc and auc.smooth.roc
  684 + smooth.roc.call$roc <- roc
  685 + smooth.roc <- try(eval(smooth.roc.call), silent=TRUE)
  686 + if (is(smooth.roc, "try-error"))
  687 + return(NA)
  688 + as.numeric(coords.roc(smooth.roc, x=x, input=input, ret=ret, best.method=best.method, best.weights=best.weights))
  689 +}
4 R/ci.R
@@ -29,7 +29,7 @@ ci.default <- function(response, predictor, ...) {
29 29 ci.roc(roc.default(response, predictor, ...), ...)
30 30 }
31 31
32   -ci.smooth.roc <- function(smooth.roc, of = c("auc", "sp", "se"), ...) {
  32 +ci.smooth.roc <- function(smooth.roc, of = c("auc", "sp", "se", "coords"), ...) {
33 33 of <- match.arg(of)
34 34
35 35 if (of == "auc")
@@ -42,7 +42,7 @@ ci.smooth.roc <- function(smooth.roc, of = c("auc", "sp", "se"), ...) {
42 42 return(ci)
43 43 }
44 44
45   -ci.roc <- function(roc, of = c("auc", "thresholds", "sp", "se"), ...) {
  45 +ci.roc <- function(roc, of = c("auc", "thresholds", "sp", "se", "coords"), ...) {
46 46 of <- match.arg(of)
47 47
48 48 if (of == "auc")
151 R/ci.coords.R
... ... @@ -0,0 +1,151 @@
  1 +# pROC: Tools Receiver operating characteristic (ROC curves) with
  2 +# (partial) area under the curve, confidence intervals and comparison.
  3 +# Copyright (C) 2010, 2011 Xavier Robin, Alexandre Hainard, Natacha Turck,
  4 +# Natalia Tiberti, Frédérique Lisacek, Jean-Charles Sanchez
  5 +# and Markus Müller
  6 +#
  7 +# This program is free software: you can redistribute it and/or modify
  8 +# it under the terms of the GNU General Public License as published by
  9 +# the Free Software Foundation, either version 3 of the License, or
  10 +# (at your option) any later version.
  11 +#
  12 +# This program is distributed in the hope that it will be useful,
  13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15 +# GNU General Public License for more details.
  16 +#
  17 +# You should have received a copy of the GNU General Public License
  18 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
  19 +
  20 +ci.coords <- function(...) {
  21 + UseMethod("ci.coords")
  22 +}
  23 +
  24 +ci.coords.formula <- function(formula, data, ...) {
  25 + ci.coords(roc.formula(formula, data, ci=FALSE, ...), ...)
  26 +}
  27 +
  28 +ci.coords.default <- function(response, predictor, ...) {
  29 + ci.coords(roc.default(response, predictor, ci=FALSE, ...), ...)
  30 +}
  31 +
  32 +ci.coords.smooth.roc <- function(smooth.roc,
  33 + x,
  34 + input=c("specificity", "sensitivity"), ret=c("specificity", "sensitivity"),
  35 + best.method=c("youden", "closest.topleft"), best.weights=c(1, 0.5),
  36 + conf.level = 0.95,
  37 + boot.n = 2000,
  38 + boot.stratified = TRUE,
  39 + progress = getOption("pROCProgress")$name,
  40 + ...
  41 + ) {
  42 + if (conf.level > 1 | conf.level < 0)
  43 + stop("'conf.level' must be within the interval [0,1].")
  44 + input <- match.arg(input)
  45 + ret <- roc.utils.match.coords.ret.args(ret)
  46 + if (is.character(x)) {
  47 + x <- match.arg(x, c("all", "local maximas", "best"))
  48 + if (x == "all" || x == "local maximas") {
  49 + stop("'all' and 'local maximas' are not available for confidence intervals.")
  50 + }
  51 + }
  52 +
  53 + # Check if called with density.cases or density.controls
  54 + if (is.null(smooth.roc$smoothing.args) || is.numeric(smooth.roc$smoothing.args$density.cases) || is.numeric(smooth.roc$smoothing.args$density.controls))
  55 + stop("Cannot compute CI of ROC curves smoothed with numeric density.controls and density.cases.")
  56 +
  57 + # Get the non smoothed roc.
  58 + roc <- attr(smooth.roc, "roc")
  59 + roc$ci <- NULL # remove potential ci in roc to avoid infinite loop with smooth.roc()
  60 +
  61 + # prepare the calls
  62 + smooth.roc.call <- as.call(c(match.fun("smooth.roc"), smooth.roc$smoothing.args))
  63 +
  64 + if(class(progress) != "list")
  65 + progress <- roc.utils.get.progress.bar(progress, title="Coords confidence interval", label="Bootstrap in progress...", ...)
  66 +
  67 + if (boot.stratified) {
  68 + perfs <- raply(boot.n, stratified.ci.smooth.coords(roc, x, input, ret, best.method, best.weights, smooth.roc.call), .progress=progress)
  69 + }
  70 + else {
  71 + perfs <- raply(boot.n, nonstratified.ci.smooth.coords(roc, x, input, ret, best.method, best.weights,smooth.roc.call), .progress=progress)
  72 + }
  73 +
  74 + if (any(is.na(perfs))) {
  75 + warning("NA value(s) produced during bootstrap were ignored.")
  76 + perfs <- perfs[!apply(perfs, 1, function(x) any(is.na(x))),]
  77 + }
  78 +
  79 + if (length(x) > 1) {
  80 + inputs <- paste(input, x)
  81 + rownames.ret <- paste(rep(inputs, each=length(ret)), ret, sep=": ")
  82 + }
  83 + else {
  84 + rownames.ret <- ret
  85 + }
  86 +
  87 + ci <- t(apply(perfs, 2, quantile, probs=c(0+(1-conf.level)/2, .5, 1-(1-conf.level)/2)))
  88 + rownames(ci) <- rownames.ret
  89 +
  90 + class(ci) <- "ci.coords"
  91 + attr(ci, "conf.level") <- conf.level
  92 + attr(ci, "boot.n") <- boot.n
  93 + attr(ci, "boot.stratified") <- boot.stratified
  94 + attr(ci, "roc") <- smooth.roc
  95 + return(ci)
  96 +}
  97 +
  98 +ci.coords.roc <- function(roc,
  99 + x,
  100 + input=c("threshold", "specificity", "sensitivity"), ret=c("threshold", "specificity", "sensitivity"),
  101 + best.method=c("youden", "closest.topleft"), best.weights=c(1, 0.5),
  102 + conf.level = 0.95,
  103 + boot.n = 2000,
  104 + boot.stratified = TRUE,
  105 + progress = getOption("pROCProgress")$name,
  106 + ...
  107 + ) {
  108 + if (conf.level > 1 | conf.level < 0)
  109 + stop("'conf.level' must be within the interval [0,1].")
  110 + input <- match.arg(input)
  111 + ret <- roc.utils.match.coords.ret.args(ret)
  112 + if (is.character(x)) {
  113 + x <- match.arg(x, c("all", "local maximas", "best"))
  114 + if (x == "all" || x == "local maximas") {
  115 + stop("'all' and 'local maximas' are not available for confidence intervals.")
  116 + }
  117 + }
  118 +
  119 + if(class(progress) != "list")
  120 + progress <- roc.utils.get.progress.bar(progress, title="Coords confidence interval", label="Bootstrap in progress...", ...)
  121 +
  122 + if (boot.stratified) {
  123 + perfs <- raply(boot.n, stratified.ci.coords(roc, x, input, ret, best.method, best.weights), .progress=progress, .drop=FALSE)
  124 + }
  125 + else {
  126 + perfs <- raply(boot.n, nonstratified.ci.coords(roc, x, input, ret, best.method, best.weights), .progress=progress, .drop=FALSE)
  127 + }
  128 +
  129 + if (any(is.na(perfs))) {
  130 + warning("NA value(s) produced during bootstrap were ignored.")
  131 + perfs <- perfs[!apply(perfs, 1, function(x) any(is.na(x))),]
  132 + }
  133 +
  134 + if (length(x) > 1) {
  135 + inputs <- paste(input, x)
  136 + rownames.ret <- paste(rep(inputs, each=length(ret)), ret, sep=": ")
  137 + }
  138 + else {
  139 + rownames.ret <- ret
  140 + }
  141 +
  142 + ci <- t(apply(perfs, 2, quantile, probs=c(0+(1-conf.level)/2, .5, 1-(1-conf.level)/2)))
  143 + rownames(ci) <- rownames.ret
  144 +
  145 + class(ci) <- c("ci.coords", "matrix")
  146 + attr(ci, "conf.level") <- conf.level
  147 + attr(ci, "boot.n") <- boot.n
  148 + attr(ci, "boot.stratified") <- boot.stratified
  149 + attr(ci, "roc") <- roc
  150 + return(ci)
  151 +}
6 R/coords.R
@@ -133,11 +133,7 @@ coords.roc <- function(roc, x, input=c("threshold", "specificity", "sensitivity"
133 133 # match input
134 134 input <- match.arg(input)
135 135 # match return
136   - valid.ret.args <- c("threshold", "specificity", "sensitivity", "accuracy", "tn", "tp", "fn", "fp", "npv", "ppv", "1-specificity", "1-sensitivity", "1-accuracy", "1-npv", "1-ppv")
137   - ret <- replace(ret, ret=="t", "threshold")
138   - ret <- replace(ret, ret=="npe", "1-npv")
139   - ret <- replace(ret, ret=="ppe", "1-ppv")
140   - ret <- match.arg(ret, valid.ret.args, several.ok=TRUE)
  136 + ret <- roc.utils.match.coords.ret.args(ret)
141 137 # make sure the sort of roc is correct
142 138 roc <- sort(roc)
143 139
4 R/onLoad.R
@@ -21,11 +21,13 @@
21 21 # Generate progressbar option with smart default values
22 22 if (is.null(getOption("pROCProgress"))) {
23 23 if (interactive()) {
  24 + # Check the presence of tcltk
  25 + tcltk.present <- length(find.package("tcltk", quiet=TRUE)) > 0
24 26 if (!is.null(getOption("STERM")) && getOption("STERM") == "iESS")
25 27 options("pROCProgress" = list(name = "text", width = NA, char = "=", style = 1))
26 28 else if (.Platform$OS.type == "windows")
27 29 options("pROCProgress" = list(name = "win", width = 300))
28   - else if ("tcltk" %in% installed.packages()[,1] && Sys.getenv("DISPLAY") != "")
  30 + else if (tcltk.present && Sys.getenv("DISPLAY") != "")
29 31 options("pROCProgress" = list(name = "tk", width = 300))
30 32 else
31 33 options("pROCProgress" = list(name = "text", width = NA, char = "=", style = 3))
17 R/print.R
@@ -168,6 +168,23 @@ print.ci.se <- function(x, digits=max(3, getOption("digits") - 3), ...) {
168 168 invisible(x)
169 169 }
170 170
  171 +print.ci.coords <- function(x, digits=max(3, getOption("digits") - 3), ...) {
  172 + cat(attr(x, "conf.level")*100, "% CI", sep="")
  173 + cat(" (", attr(x, "boot.n"), " ", ifelse(attr(x, "boot.stratified"), "stratified", "non-stratified"), " bootstrap replicates):\n", sep="")
  174 +
  175 + # Back to the standard object we'll print
  176 + unattr.coords <- x
  177 + class(unattr.coords) <- "matrix"
  178 + attr(unattr.coords, "conf.level") <- NULL
  179 + attr(unattr.coords, "boot.n") <- NULL
  180 + attr(unattr.coords, "boot.stratified") <- NULL
  181 + attr(unattr.coords, "roc") <- NULL
  182 +
  183 + class(unattr.coords) <- "matrix"
  184 + print(unattr.coords, digits=digits)
  185 + invisible(x)
  186 +}
  187 +
171 188 print.dataline <- function(x) {
172 189 # Case / Controls call
173 190 if ("cases" %in% names(x$call) && "controls" %in% names(x$call)) {
20 R/roc.utils.R
@@ -112,8 +112,14 @@ roc.utils.max.thresholds.idx <- function(thresholds, sp, se) {
112 112 # Define which progress bar to use
113 113 roc.utils.get.progress.bar <- function(name = getOption("pROCProgress")$name, title = "Bootstrap", label = "", width = getOption("pROCProgress")$width, char = getOption("pROCProgress")$char, style = getOption("pROCProgress")$style, ...) {
114 114 if (name == "tk") { # load tcltk if possible
115   - if (!require(tcltk))
116   - stop("Package tcltk not available, required with progress='tk'")
  115 + if (!require(tcltk)) {
  116 + # If tcltk cannot be loaded fall back to default text progress bar
  117 + name <- "text"
  118 + style <- 3
  119 + char <- "="
  120 + width <- NA
  121 + warning("Package tcltk required with progress='tk' but could not be loaded. Falling back to text progress bar.")
  122 + }
117 123 }
118 124 if (name == "none")
119 125 progress_none()
@@ -150,3 +156,13 @@ sort.smooth.roc <- function(roc) {
150 156 }
151 157 return(roc)
152 158 }
  159 +
  160 +# Arguments which can be returned by coords
  161 +roc.utils.match.coords.ret.args <- function(x) {
  162 + valid.ret.args <- c("threshold", "specificity", "sensitivity", "accuracy", "tn", "tp", "fn", "fp", "npv", "ppv", "1-specificity", "1-sensitivity", "1-accuracy", "1-npv", "1-ppv")
  163 + x <- replace(x, x=="t", "threshold")
  164 + x <- replace(x, x=="npe", "1-npv")
  165 + x <- replace(x, x=="ppe", "1-ppv")
  166 + match.arg(x, valid.ret.args, several.ok=TRUE)
  167 +}
  168 +
13 man/ci.Rd
@@ -17,8 +17,8 @@
17 17 }
18 18 \usage{
19 19 ci(...)
20   -\S3method{ci}{roc}(roc, of = c("auc", "thresholds", "sp", "se"), ...)
21   -\S3method{ci}{smooth.roc}(smooth.roc, of = c("auc", "sp", "se"), ...)
  20 +\S3method{ci}{roc}(roc, of = c("auc", "thresholds", "sp", "se", "coords"), ...)
  21 +\S3method{ci}{smooth.roc}(smooth.roc, of = c("auc", "sp", "se", "coords"), ...)
22 22 \S3method{ci}{formula}(formula, data, ...)
23 23 \S3method{ci}{default}(response, predictor, ...)
24 24 }
@@ -33,7 +33,7 @@ ci(...)
33 33 response~predictor for the \code{\link{roc}} function.
34 34 }
35 35 \item{of}{The type of confidence interval. One of \dQuote{auc},
36   - \dQuote{thresholds}, \dQuote{sp} or \dQuote{se}. Note that
  36 + \dQuote{thresholds}, \dQuote{sp}, \dQuote{se} or \dQuote{coords}. Note that
37 37 confidence interval on \dQuote{thresholds} are not available for
38 38 smoothed ROC curves.
39 39 }
@@ -54,13 +54,12 @@ ci(...)
54 54 This function is typically called from \code{\link{roc}} when \code{ci=TRUE} (not by
55 55 default). Depending on the \code{of} argument, the specific
56 56 \code{ci} functions \code{\link{ci.auc}}, \code{\link{ci.thresholds}},
57   - \code{\link{ci.sp}} or \code{\link{ci.se}} are called.
  57 + \code{\link{ci.sp}}, \code{\link{ci.se}} or \code{\link{ci.coords}} are called.
58 58 }
59 59
60 60 \value{
61 61 The return value of the specific \code{ci} functions
62   -\code{\link{ci.auc}}, \code{\link{ci.thresholds}}, \code{\link{ci.sp}}
63   -or \code{\link{ci.se}}, depending on the
  62 +\code{\link{ci.auc}}, \code{\link{ci.thresholds}}, \code{\link{ci.sp}}, \code{\link{ci.se}} or \code{\link{ci.coords}}, depending on the
64 63 \code{of} argument.
65 64 }
66 65
@@ -73,7 +72,7 @@ or \code{\link{ci.se}}, depending on the
73 72
74 73 \seealso{
75 74 \code{\link{roc}}, \code{\link{auc}}, \code{\link{ci.auc}},
76   - \code{\link{ci.thresholds}}, \code{\link{ci.sp}}, \code{\link{ci.se}}
  75 + \code{\link{ci.thresholds}}, \code{\link{ci.sp}}, \code{\link{ci.se}}, \code{\link{ci.coords}}
77 76 }
78 77
79 78 \examples{
2  man/coords.Rd
@@ -207,7 +207,7 @@ best.weights=c(1, 0.5), ...)
207 207 }
208 208
209 209 \seealso{
210   -\code{\link{roc}}
  210 +\code{\link{roc}}, \code{\link{ci.coords}}
211 211 }
212 212 \examples{
213 213 data(aSAH)
3  man/pROC-package.Rd
@@ -70,10 +70,11 @@
70 70 \code{\link{auc}} \tab Compute the area under the ROC curve \cr
71 71 \code{\link{ci}} \tab Compute confidence intervals of a ROC curve \cr
72 72 \code{\link{ci.auc}} \tab Compute the CI of the AUC \cr
  73 + \code{\link{ci.coords}} \tab Compute the CI of arbitrary coordinates \cr
73 74 \code{\link{ci.se}} \tab Compute the CI of sensitivities at given specificities \cr
74 75 \code{\link{ci.sp}} \tab Compute the CI of specificities at given sensitivities \cr
75 76 \code{\link{ci.thresholds}} \tab Compute the CI of specificity and sensitivity of thresholds \cr
76   - \code{\link{coords}} \tab Coordinates of a ROC curve \cr
  77 + \code{\link{coords}} \tab Coordinates of the ROC curve \cr
77 78 \code{\link[=cov.roc]{cov}} \tab Covariance between two AUCs\cr
78 79 \code{\link{has.partial.auc}} \tab Determine if the ROC curve have a partial AUC\cr
79 80 \code{\link{lines.roc}} \tab Add a ROC line to a ROC plot \cr
12 man/roc.Rd
@@ -65,9 +65,9 @@ plot=FALSE, smooth.method="binormal", ci.method=NULL, density=NULL, ...)
65 65 \dQuote{auto} (default): automatically define in which group the
66 66 median is higher and take the direction accordingly.
67 67 \dQuote{>}: if the predictor values for the control group are
68   - higher than the values of the case group. \dQuote{<}: if the predictor
69   - values for the control group are higher or equal than the values of
70   - the case group.
  68 + higher than the values of the case group (controls > t >= cases).
  69 + \dQuote{<}: if the predictor values for the control group are higher
  70 + or equal than the values of the case group (controls < t <= cases).
71 71 }
72 72 \item{smooth}{if TRUE, the ROC curve is passed to \code{\link{smooth}}
73 73 to be smoothed.
@@ -230,16 +230,10 @@ plot=FALSE, smooth.method="binormal", ci.method=NULL, density=NULL, ...)
230 230 (2011) ``pROC: an open-source package for R and S+ to analyze and
231 231 compare ROC curves''. \emph{BMC Bioinformatics}, \bold{7}, 77.
232 232 DOI: \href{http://dx.doi.org/10.1186/1471-2105-12-77}{10.1186/1471-2105-12-77}.
233   -
234   - Hadley Wickham (2011) ``The Split-Apply-Combine Strategy for Data Analysis''. \emph{Journal of Statistical Software}, \bold{40}, 1--29.
235   - URL: \href{http://www.jstatsoft.org/v40/i01}{www.jstatsoft.org/v40/i01}.
236   -
237 233 }
238 234
239 235 \seealso{
240 236 \code{\link{auc}}, \code{\link{ci}}, \code{\link{plot.roc}}, \code{\link{print.roc}}, \code{\link{roc.test}}
241   -
242   - CRAN package \pkg{plyr}, employed in this function.
243 237 }
244 238
245 239 \examples{
5 man/smooth.roc.Rd
@@ -232,7 +232,7 @@ reuse.auc=TRUE, reuse.ci=FALSE, ...)
232 232 require additional packages. If not available, the following message
233 233 will be displayed with the required command to install the package:
234 234 \dQuote{Package ? not available, required with method='?'.
235   - Please install it with 'install.packages("?")'."
  235 + Please install it with 'install.packages("?")'.
236 236 }
237 237 }
238 238
@@ -248,6 +248,9 @@ reuse.auc=TRUE, reuse.ci=FALSE, ...)
248 248 (2011) ``pROC: an open-source package for R and S+ to analyze and
249 249 compare ROC curves''. \emph{BMC Bioinformatics}, \bold{7}, 77.
250 250 DOI: \href{http://dx.doi.org/10.1186/1471-2105-12-77}{10.1186/1471-2105-12-77}.
  251 +
  252 + William N. Venables, Brian D. Ripley (2002). ``Modern Applied Statistics with S''. New York, Springer.
  253 + \href{http://books.google.ch/books?id=974c4vKurNkC}{Google books}.
251 254
252 255 Kelly H. Zou, W. J. Hall and David E. Shapiro (1997) ``Smooth
253 256 non-parametric receiver operating characteristic (ROC) curves for

No commit comments for this range

Something went wrong with that request. Please try again.