roc {Daim}R Documentation

Compute a ROC curve

Description

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

Usage

## 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


  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)


[Package Daim version 1.0.0 Index]