Draw FROC curves and AFROC curves for user's specified modalities and user's specified readers. Using this function repeatedly, we can draw the different reader and modality in a same plane simultaneously.
DrawCurves_MRMC_pairwise(
StanS4class,
modalityID,
type_to_be_passed_into_plot = "p",
title = TRUE,
readerID,
Colour = TRUE,
DrawFROCcurve = TRUE,
DrawAFROCcurve = FALSE,
DrawCFPCTP = TRUE,
Draw.Flexible.upper_y = TRUE,
Draw.Flexible.lower_y = TRUE,
new.imaging.device = TRUE,
summary = TRUE,
color_is_changed_by_each_reader = FALSE,
type = 1
)
An S4 object of class stanfitExtended
which is an inherited class from the S4 class stanfit
.
This R object is a fitted model object
as a return value of the function fit_Bayesian_FROC()
.
To be passed to DrawCurves()
... etc
This is a vector indicating modalityID whose component is natural namber.
"l" or "p".
Logical: TRUE
of FALSE
. If TRUE
(default), then title of curves are drawn.
This is a vector indicating readerID whose component is natural namber.
Logical, that is TRUE
or FALSE
. Whether plot of curves are with dark theme. Default is TRUE
indicating dark theme.
Logical: TRUE
of FALSE
. Whether the FROC curve is to be drawn.
Logical: TRUE
of FALSE
. Whether the AFROC curve is to be drawn.
Logical: TRUE
of FALSE
. Whether the CFP and CTP points are to be drawn. CFP: Cumulative false positive per lesion (or image) which is also called False Positive Fraction (FPF). CTP Cumulative True Positive per lesion which is also called True Positive Fraction (TPF)..
Logical, that is TRUE
or FALSE
. Whether or not the upper bounds of vertical axis are determined automatically.
Logical, that is TRUE
or FALSE
. Whether or not the lower bounds of vertical axis are determined automatically.
Logical: TRUE
of FALSE
. If TRUE (default), then open a new device to draw curve.
Using this we can draw curves in same plain by new.imaging.device=FALSE.
Logical: TRUE
of FALSE
. Whether to print the verbose summary. If TRUE
then verbose summary is printed in the R console. If FALSE
, the output is minimal. I regret, this variable name should be verbose.
A logical, if TRUE
, then the FROC curves, AFROC curves, and FPF, TPF are colored accordingly by each reader. The aim of FROC analysis is to compare the modality and not reader, so the default value is false, and curves and FPF and TPF are colored by each modalities.
An integer, for the color of background and etc.
By drawing different modality FROC curves in the same plane, we can compare the modality.
E.g., if some modality FROC curve is upper
then other modality curves,
then we may say that the upper modality is better
observer performance, i.e., higher AUC.
# NOT RUN {
# }
# NOT RUN {
#1) Fit a model to data by the following:
fit <- fit_Bayesian_FROC(dataList.Chakra.Web, ite = 1111)
#Note that the return value "fit" is an object of an inherited S4 class from stanfit
#2) Using the above S4 class object, we draw the curves.
DrawCurves_MRMC_pairwise(fit,
modality = 1,
reader = 4
)
#3) By changing the modality (or reader),
#we can draw the curves with respect to different modalities.
#This shows the comparison of modalites.
DrawCurves_MRMC_pairwise(fit,
modality = 2,
reader = 4
)
DrawCurves_MRMC_pairwise(fit,
modality = 3,
reader = 4
)
#4) By repeating in this manner for different modalities or readers,
# we can draw AFROC (FROC) curves in a single imaging device.
# Revised 2019 Nov 27
#5) If you want to draw the FROC curves
#for reader ID =1,2,3,4 and modality ID =1,2, then the code is as follows;
DrawCurves_MRMC_pairwise(
fit,
modalityID = c(1,2,3,4),
readerID = c(1,2)
)
# Each color of curves corresponds to the modality ID.
# So, even if curves are different readers and same modality, then color is same.
# Close the graphic device
Close_all_graphic_devices()
# }
# NOT RUN {
# dottest
# }
Run the code above in your browser using DataLab