Learn R Programming

RJafroc (version 1.0.1)

PlotRsmOperatingCharacteristics: RSM predicted operating characteristics, ROC pdfs and different FOMs possible with FROC data

Description

Visualize predicted ROCs, AFROCs, wAFROCs, FROCs and pdfs (probability density functions of highest ratings, for non-diseased and diseased cases), for up to 2 sets of search model parameters. This function is useful as an instructional tool towards understanding the RSM.

Usage

PlotRsmOperatingCharacteristics (mu, lambda, nu, lesDistr, 
   lesionWeights, type = "ALL", legendPosition = c(1,0), 
   legendDirection = "horizontal", legendJustification = c(0,1), 
   nlfRange = NULL, llfRange = NULL, nlfAlpha = NULL,myNegInf = -3)

Arguments

mu

Array, max length 2. The mean(s) of the Gaussian distribution(s) for the ratings of latent LLs (continuous ratings of lesions that are found by the observer's search mechanism)

lambda

Array, max length 2. The Poisson distribution intrinsic parameter(s), which model the random numbers of latent NLs (suspicious regions that do not correspond to actual lesions) per case, for up to two treatments. The corresponding physical parameters are lambda/mu. Two conversion functions are provided: UtilIntrinsic2PhysicalRSM and UtilPhysical2IntrinsicRSM.

nu

Array, max length 2. The binomial distribution success probability intrinsic parameters, which model the random numbers of latent LLs (suspicious regions that correspond to actual lesions) per diseased case for up to two treatments; the corresponding physical parameter is 1 - exp(nu*mu), the success probability of the binomial distribution(s).

lesDistr

Array, [1:maxLL,1:2]. The probability mass function of the lesion distribution for diseased cases. The first column contains the actual numbers of lesions per case. The second column contains the fraction of diseased cases with the number of lesions specified in the first column. The second column must sum to unity.

lesionWeights

Array, [1:maxLL,1:maxLL]. The weights (or clinical importances) of the lesions. The 1st row contains the weight of the lesion on cases with one lesion only, necessarily 1; the remaining elements of the row are -Inf. The 2nd row contains the weights of the 2 lesions on cases with 2 lesions only, the remaining elements of the row, if any, are -Inf. Excluding the -Inf, each row must sum to 1. The default is equal weighting, e.g., weights are 1/3, 1/3, 1/3 on row 3. This parameter is not to be confused with the lesionWeights field in an FROC dataset with enumerates the weights of lesions on individual cases.

type

The type of operating characteristic desired: can be "ROC", "AFROC", "wAFROC", "FROC" or "pdfs" or "ALL". The default is "ALL".

legendPosition

The positioning of the legend: "right", "left", "top" or "bottom". Use "none" to suppress the legend.

legendDirection

Allows control on the direction of the legend; "horizontal", the default, or "vertical"

legendJustification

Where to position the legend, default is bottom right corner c(0,1)

nlfRange

This applies to FROC plot only. The x-axis range, e.g., c(0,2), for FROC plot. Default is "NULL", which means the maximum NLF range, as determined by the data.

llfRange

This applies to FROC plot only. The y-axis range, e.g., c(0,1), for FROC plot. Default is "NULL", which means the maximum LLF range, as determined by the data.

nlfAlpha

Upper limit of the integrated area under the FROC plot. Default is "NULL", which means the maximum NLF range is used (i.e., lambda/mu). Attempt to integrate outside the maximum NLF will generate an error.

myNegInf

How close one approaches the end-point; the default is -3. This is used in the code to demonstrate continuity of the slope of the ROC at the end point; Online Appendix 17.H.3

Value

A list of 6 elements containing six ggplot2 objects (ROCPlot, AFROCPlot wAFROCPlot, FROCPlot and PDFPlot) and two area measures (each of which can have up to two elements), the area under the search model predicted ROC curves in up to two treatments, the area under the search model predicted AFROC curves in up to two treatments, the area under the search model predicted wAFROC curves in up to two treatments, the area under the search model predicted FROC curves in up to two treatments.

  • ROCPlot The predicted ROC plots

  • AFROCPlot The predicted AFROC plots

  • wAFROCPlot The predicted wAFROC plots

  • FROCPlot The predicted FROC plots

  • PDFPlot The predicted pdf plots

  • aucROC The predicted ROC AUCs

  • aucAFROC The predicted AFROC AUCs

  • aucwAFROC The predicted wAFROC AUCs

  • aucFROC The predicted FROC AUCs

Details

RSM is the Radiological Search Model described in the book.

References

Chakraborty DP (2006) A search model and figure of merit for observer data acquired according to the free-response paradigm, Phys Med Biol 51, 3449-3462.

Chakraborty DP (2006) ROC Curves predicted by a model of visual search, Phys Med Biol 51, 3463--3482.

Chakraborty, DP, Yoon, HJ (2008) Operating characteristics predicted by models for diagnostic tasks involving lesion localization, Med Phys, 35:2, 435.

Chakraborty DP (2017) Observer Performance Methods for Diagnostic Imaging - Foundations, Modeling, and Applications with R-Based Examples (CRC Press, Boca Raton, FL). https://www.crcpress.com/Observer-Performance-Methods-for-Diagnostic-Imaging-Foundations-Modeling/Chakraborty/p/book/9781482214840

Examples

Run this code
# NOT RUN {
## Following example is for mu = 2, lambda = 1, nu = 0.6, in one treatment and   
## mu = 3, lambda = 1.5, nu = 0.8, in the other treatment. 20% of the diseased 
## cases have a single lesion, 40% have two lesions, 10% have 3 lesions, 
## and 30% have 4 lesions.  
lesDistr <- rbind(c(1, 0.2), c(2, 0.4), c(3, 0.1), c(4, 0.3))

## On cases with one lesion the weights are 1, on cases with 2 lesions the weights
## are 0.4 and 0.6, on cases with three lesions the weights are 0.2, 0.3 and 0.5, and
## on cases with 4 lesions the weights are 0.3, 0.4, 0.2 and 0.1: 
lesionWeights <- rbind(c(1.0, -Inf, -Inf, -Inf), 
                       c(0.4,  0.6, -Inf, -Inf), 
                       c(0.2,  0.3,  0.5, -Inf), 
                       c(0.3,  0.4, 0.2,  0.1))
ret <- PlotRsmOperatingCharacteristics(mu = c(2, 3), lambda = c(1, 1.5), nu = c(0.6, 0.8),
   lesDistr = lesDistr, lesionWeights = lesionWeights, 
   legendPosition = "bottom", nlfRange = c(0, 1), llfRange = c(0, 1))
   print(ret$ROCPlot)
   print(ret$AFROCPlot)
   print(ret$wAFROCPlot)
   print(ret$FROCPlot)
## the FROC plot ends at NLF = 0.5 because for both treatments the physical lambdas are 0.5.

# }

Run the code above in your browser using DataLab