rocsurf.emp: Empirical ROC surface plot

View source: R/rocsurf.emp.R

rocsurf.empR Documentation

Empirical ROC surface plot

Description

Function for computation of the empirical ROC surface.

Usage

rocsurf.emp(x, y, z, plot = TRUE, saveVUS = FALSE)

Arguments

x, y, z

Vectors containing the data of the three classes "healthy", "intermediate" and "diseased".

plot

logical. If TRUE (default), the VUS is plotted using surface3d from the package rgl.

saveVUS

A logical whether to save a PNG of the VUS in your current working directory (default is FALSE).

Details

This function takes three-class ROC data and computes the three dimentional surface using the R-package rgl. The ROC surface is defined as

z = ROCs(t_-,t_+) = F_0(c_+) - F_0(c_-)=F_0(G_+^{-1}(t_+) ) -F_0(F_-^{-1}(t_-) ),

where c_-, c_+ are the two cut-off points and F_-, F_0, F_+ the cdf of the three classes with G = 1-F.

Value

A list with the following components:

t1, t2, zVUS

The matice containing the surface values.

x, y, z

The original data.

See Also

surface3d.

Examples

data(cancer)
x1 <- with(cancer, cancer[trueClass=="healthy", 9])
y1 <- with(cancer, cancer[trueClass=="intermediate", 9])
z1 <- with(cancer, cancer[trueClass=="diseased", 9])

rocsurf.emp(x1, y1, z1)

trinROC documentation built on Oct. 29, 2022, 1:12 a.m.