ROCplots
A variety of ROC-related plots for a binary target and a single continuous predictor.
ROCplots(data, whichPlots = c("density", "raw", "ROC", "pv", "nnt", "nntRange"), NNTlower = 3, NNTupper = 10, N = 1000, prev = 0.2, diffInSD = 2, ...)
data |
Data frame with columns "class" (binary target variable) and "X" (predictor). |
whichPlots |
Which plots to do. Options are c("density", "raw", "ROC", "pv", "nnt") |
NNTlower |
Subjective input. If NNT < NNTlower, the decision is clearly to Treat. |
NNTupper |
Subjective input. If NNT > NNTupper, the decision is clearly to Wait. |
N |
For simulated data: sample size |
prev |
For simulated data: Prevalence |
diffInSD |
For simulated data: Difference: E(X | group=1) - E(X | group=0),measured in units of S.D (common to the 2 groups). |
... |
Extra arguments for a plot. Do not supply unless length(whichPlots)==1. |
The plots display the values achievable by changing the cutoff, in comparison with the desired values as determined by NNTlower and NNTupper. The "whichPlots" options are as follows:
"density"Marginal density of X, with rug.
"raw"X versus class.
"ROC"Standard ROC curve.
"pv"Plot of ppv versus npv, with indication of the acceptable range for cutoff.
"nnt"Plot of NNTpos versus NNTneg, with indication of the acceptable region
"nntRange"Plot of NNTpos and NNTneg versus cutoff, with indication of the acceptable range.
By default, all the plots are made.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.