Learn R Programming

ks (version 1.8.1)

plot.kroc: Plot for kernel receiver operating characteristic curve (ROC) estimate

Description

Plot for kernel receiver operating characteristic curve (ROC) estimate 1- to 3-dimensional data.

Usage

## S3 method for class 'kroc':
plot(x, add=FALSE, add.roc.ref=FALSE, ylab, xlab, ...)

Arguments

x
an object of class kroc (output from kroc)
add
flag to add to current plot. Default is FALSE.
add.roc.ref
flag to add reference ROC curve. Default is FALSE.
xlab
x-axis label. Default is "False positive rate (bar(specificity))".
ylab
y-axis label. Default is "True positive rate (sensitivity)".
...
other graphics parameters used in plot.kde.

Value

  • Plots for 1-d and 2-d are sent to graphics window. Plot for 3-d is sent to RGL window.

See Also

plot.kde

Examples

Run this code
library(MASS)
data(iris)
x1 <- iris[iris[,5]=="setosa",1:2]
x2 <- iris[iris[,5]=="versicolor",1:2]
Rhat <- kroc(x1=x1, x2=x2, approx.ref="kcde")
  ## approx.ref="kcde" is faster but less accurate than "pmvnorm"
plot(Rhat)
abline(0,1, lty=2, col="grey")

Run the code above in your browser using DataLab