Daim (version 1.1.0)

roc: Compute a ROC curve

Description

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

Usage

"roc"(x, ...)
"roc"(x, labels, labpos, thres=NULL, ...)
"roc"(x, labels, labpos, thres=NULL, ...)
"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

Run this code

  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)

Run the code above in your browser using DataLab