plot.optimal.cutpoints {OptimalCutpoints} | R Documentation |
Default optimal.cutpoints plotting
Description
On the basis of an optimal.cutpoints
object, three plots are currently available: (1) a plot of the Receiver Operating Characteristic (ROC) curve; (2) a plot of the Predictive ROC (PROC) curve; and, in some methods, (3) a plot of the values of the optimal criterion used as a function of the cutoffs.
Usage
## S3 method for class 'optimal.cutpoints'
plot(x, legend = TRUE, which = c(1,2), ...)
Arguments
x |
an object of class |
legend |
a logical value for including the legend of optimal coordinates with specific characteristics. The default is TRUE. |
which |
a numeric vector with the required plots. By default, both the ROC and the PROC curves are plotted. |
... |
further arguments passed to method |
Author(s)
Monica Lopez-Raton and Maria Xose Rodriguez-Alvarez
See Also
optimal.cutpoints
, control.cutpoints
Examples
library(OptimalCutpoints)
data(elas)
###########################################################
# Youden Index method ("Youden"): Covariate gender
###########################################################
optimal.cutpoint.Youden<-optimal.cutpoints(X = "elas", status = "status", tag.healthy = 0,
methods = "Youden", data = elas, pop.prev = NULL, categorical.cov = "gender",
control = control.cutpoints(), ci.fit = TRUE, conf.level = 0.95, trace = FALSE)
# Plot by default
plot(optimal.cutpoint.Youden)
# Not including the optimal coordinates
plot(optimal.cutpoint.Youden, legend = FALSE)
# Change the colour
plot(optimal.cutpoint.Youden, col = "blue")
[Package OptimalCutpoints version 1.1-5 Index]