Plot receiver operating characteristic plot.

ROCPlot( frame, xvar, truthVar, truthTarget, title, ..., estimate_sig = FALSE, returnScores = FALSE, nrep = 100, parallelCluster = NULL, curve_color = "darkblue", fill_color = "black", diag_color = "black" )

frame | data frame to get values from |
---|---|

xvar | name of the independent (input or model) column in frame |

truthVar | name of the dependent (output or result to be modeled) column in frame |

truthTarget | value we consider to be positive |

title | title to place on plot |

... | no unnamed argument, added to force named binding of later arguments. |

estimate_sig | logical, if TRUE estimate and display significance of difference from AUC 0.5. |

returnScores | logical if TRUE return detailed permutedScores |

nrep | number of permutation repetitions to estimate p values. |

parallelCluster | (optional) a cluster object created by package parallel or package snow. |

curve_color | color of the ROC curve |

fill_color | shading color for the area under the curve |

diag_color | color for the AUC=0.5 line (x=y) |

See https://www.nature.com/articles/nmeth.3945 for a discussion of true positive and false positive rates, and how the ROC plot relates to the precision/recall plot.

set.seed(34903490) x = rnorm(50) y = 0.5*x^2 + 2*x + rnorm(length(x)) frm = data.frame(x=x,yC=y>=as.numeric(quantile(y,probs=0.8))) WVPlots::ROCPlot(frm, "x", "yC", TRUE, title="Example ROC plot", estimate_sig = TRUE)