roc.Daim: Compute a ROC curve

Description Usage Arguments See Also Examples

Description

This function computes sensitivity and specificity for a variety of cut-points.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'integer'
roc(x, ...)

## S3 method for class 'numeric'
roc(x, labels, labpos, thres=NULL, ...)

## S3 method for class 'matrix'
roc(x, labels, labpos, thres=NULL, ...)

## S3 method for class 'data.frame'
roc(x, ...)

Arguments

x

an object (vector, matrix, data.frame) used for prediction.

labels

a vector containing the true class labels. This can be a factor or character vector.

labpos

a character string of the variable labels that defines a "positive" event.

thres

a numeric vector with the cutoff values. By default, the x define the grid of cut-points.

...

additional parameters.

See Also

plot.Daim, auc.Daim

Examples

1
2
3
4
5
6
7
  data(Daim.data3)

  M <- roc(Daim.data3[,2:5], Daim.data3$Gold, "pos")
  summary(M)
  plot(M,color=c("black","blue","green3","red"))

  roc.area(M)

Daim documentation built on May 29, 2017, 9:08 a.m.