zroc_plot: A function to plot z-ROC curves. Note that the NA values in...

View source: R/zroc_plot.R

zroc_plotR Documentation

A function to plot z-ROC curves. Note that the NA values in the data will be replaced with zero.

Description

A function to plot z-ROC curves. Note that the NA values in the data will be replaced with zero.

Usage

zroc_plot(cp, ca, group = NULL, byDR = FALSE, grayscale = FALSE, ...)

Arguments

cp

A vector of cp id rates or frequencies.

ca

A vector of ca id rates or frequencies.

group

Grouping variable to indicate group membership. Will create an ROC curve and calculate AUC for each group.

byDR

Whether to order ids by diagnosticity ratios. Defaults to FALSE.

grayscale

Whether to produce the plot in grayscale. Defaults to FALSE.

...

Additional plotting parameters. For example, users can change x-axis and y-axis labels using xlab and ylab.

Value

Plot z-ROC curves.

Examples

cpf1 <- c(100, 90, 80, 20, 10, 5)
caf1 <- c(6, 7, 15, 50, 75, 120)
zroc_plot(cpf1, caf1)


cpf2 <- c(90, 40, 20)
caf2 <- c(10, 70, 80)
zroc_plot(cpf2, caf2)

## plot two ROC curves
cpf <- c(cpf1, cpf2)
caf <- c(caf1, caf2)
group <- rep(letters[1:2], times = c(length(cpf1), length(cpf2) ) )
zroc_plot(cpf, caf, group = group)


yuerany/fullROC documentation built on March 24, 2023, 4:11 a.m.