Learn R Programming

RJafroc (version 1.0.1)

FitCbmRoc: Fit the contaminated binormal model (CBM) to selected treatment and reader in an ROC dataset

Description

Fit the CBM-predicted ROC curve for specified modality and reader

Usage

FitCbmRoc(dataset, trt = 1, rdr = 1)

Arguments

dataset

The dataset containing the data

trt

The desired treatment, default is 1

rdr

The desired reader, default is 1

Value

The return value is a list with the following elements:

mu

The mean of the visible diseased distribution (the non-diseased) has zero mean

alpha

The proportion of diseased cases where the disease is visible

zetas

The cutoffs, zetas or thresholds

AUC

The AUC of the fitted ROC curve

StdAUC

The standard deviation of AUC

NLLIni

The initial value of negative LL

NLLFin

The final value of negative LL

ChisqrFitStats

The chisquare goodness of fit results

covMat

The covariance matrix of the parameters

fittedPlot

A ggplot2 object containing the fitted operating characteristic along with the empirical operating points. Use print() to display the object

Details

In CBM ratings from diseased cases are sampled from a mixture distribution: (1) with integrated area \(alpha\) distributed \(N(\eqn{mu},1)\) and (2) from a distribution with integrated area \(1-alpha\) distributed\(N(0,1)\). Ratings for non-diseased cases are sampled from \(N(0,1)\). The ChisqrFitStats consists of a list containing the chi-square value, the p-value and the degrees of freedom.

References

Dorfman DD, Berbaum KS (2000) A contaminated binormal model for ROC data: Part II. A formal model, Acad Radiol, 7:6, 427--437.

Examples

Run this code
# NOT RUN {
## Test with included ROC data
retFit <- FitCbmRoc(dataset02);print(retFit$fittedPlot)

## Test with included degenerate ROC data (yes! CBM can fit such data)
retFit <- FitCbmRoc(datasetDegenerate);print(retFit$fittedPlot)

## Test with single interior point data
fp <- c(rep(1,7), rep(2, 3))
tp <- c(rep(1,5), rep(2, 5))
dataset <- Df2RJafrocDataset(fp, tp)
retFit <- FitCbmRoc(dataset);print(retFit$fittedPlot)

## Test with two interior data points
fp <- c(rep(1,7), rep(2, 5), rep(3, 3))
tp <- c(rep(1,3), rep(2, 5), rep(3, 7))
dataset <- Df2RJafrocDataset(fp, tp)
retFit <- FitCbmRoc(dataset);print(retFit$fittedPlot)

## Test with included ROC data (some bins have zero counts)
retFit <- FitCbmRoc(dataset02, 2, 1);print(retFit$fittedPlot)

# }

Run the code above in your browser using DataLab