Description Usage Arguments Author(s) Examples
Given a list of predictive scores, and a list of corresponding true outcomes, this function calculates various predictive performance measures. Note that this function can be used in the context of multiple imputation (if the argument n.mi.chains is used), in which case the performance measures are calculated within each chain then averaged.
1 2 3 4 |
rocr.list |
A named list of objects created using the ROCR function PredictivePerformance, or by using the Pmisc function FormatRocrObjects |
fpr.stop |
An optional maximum false positive rate (x-axis) to calculate truncated ROC curves |
lwd |
Line width of ROC curves (default 1) |
roc.cols |
Optional named vector of colours to use for the different ROC curves |
legend.name.map |
A character vector of different names to display for the analyses in the legend. The elements are named with the current analysis names. |
legend.cex |
cex argument to pass to legend - controls overall size. |
legend.text.width |
text.width argument to pass to legend - controls width in terms of x scale. |
main |
Main plot title (default NULL) |
Paul Newcombe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | require(ROCR)
require(Pmisc)
n.vars <- 10
n.folds <- 10
# Example predictions and outcomes (in matrix format)
predictions.list <- list()
predictions.list[[1]] <- matrix(rnorm(100,0,1),n.vars,n.folds)
predictions.list[[2]] <- matrix(rnorm(100,0,1),n.vars,n.folds)
true.outcomes <- matrix(rbinom(n=100,size=1,prob=0.5),n.vars,n.folds)
# Use function to construct ROCR objects for plotting
rocs <- FormatRocrObjects(predictions.list, true.outcomes)
# Plot
RocPlots(rocs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.