ggplotFROC.EAP: Draw FROC curves by two parameters a and b

Description Usage Arguments

View source: R/plotFROC.R

Description

Plot FROC curves based on two parameters a and b.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ggplotFROC.EAP(
  a,
  b,
  mesh.for.drawing.curve = 10000,
  upper_x = 1,
  upper_y = 1,
  lower_y = 0,
  dataList,
  StanS4class
)

Arguments

a

An arbitrary real number. It is no need to require any assumption, but I use such as a=μ/σ, where μ is a mean of signal distribution and σ is its standard deviation in the bi-normal assumption.

b

An arbitrary positive real number. I use such as b=1/σ, where σ is a standard deviation of signal distribution in the bi-noraml assumption.

mesh.for.drawing.curve

A positive large integer, indicating number of dots drawing the curves, Default =10000.

upper_x

A positive real number, indicating the frame size of drawing picture.

upper_y

A positive real number, indicating the frame size of drawing picture.

lower_y

A positive real number, indicating the frame size of drawing picture.

dataList

A list, specifying an FROC data to be fitted a model. It consists of data of numbers of TPs, FPs, lesions, images. .In addition, if in case of mutiple readers or mutiple modalities, then modaity ID and reader ID are included also.

The dataList will be passed to the function rstan::sampling() of rstan. This is a variable in the function rstan::sampling() in which it is named data.

For the single reader and a single modality data, the dataList is made by the following manner:

dataList.Example <- list(

h = c(41,22,14,8,1), # number of hits for each confidence level

f = c(1,2,5,11,13), # number of false alarms for each confidence level

NL = 124, # number of lesions (signals)

NI = 63, # number of images (trials)

C = 5) # number of confidence, .. the author thinks it can be calculated as the length of h or f ...? ha, why I included this. ha .. should be omitted.

Using this object dataList.Example, we can apply fit_Bayesian_FROC() such as fit_Bayesian_FROC(dataList.Example).

To make this R object dataList representing FROC data, this package provides three functions:

dataset_creator_new_version()

Enter TP and FP data by table .

create_dataset()

Enter TP and FP data by interactive manner.

Before fitting a model, we can confirm our dataset is correctly formulated by using the function viewdata().

—————————————————————————————-

A Single reader and a single modality (SRSC) case.

—————————————————————————————-

In a single reader and a single modality case (srsc), dataList is a list consisting of f, h, NL, NI, C where f, h are numeric vectors and NL, NI, C are positive integers.

f

Non-negative integer vector specifying number of false alarms associated with each confidence level. The first component corresponding to the highest confidence level.

h

Non-negative integer vector specifying number of Hits associated with each confidence level. The first component corresponding to the highest confidence level.

NL

A positive integer, representing Number of Lesions.

NI

A positive integer, representing Number of Images.

C

A positive integer, representing Number of Confidence level.

The detail of these dataset, see the datasets endowed with this package. 'Note that the maximal number of confidence level, denoted by C, are included, however, Note that confidence level vector c should not be specified. If specified, will be ignored , since it is created by c <-c(rep(C:1)) in the inner program and do not refer from user input data, where C is the highest number of confidence levels. So, you should write down your hits and false alarms vector so that it is compatible with this automatically created c vector.

data Format:

A single reader and a single modality case

——————————————————————————————————

NI=63,NL=124 confidence level No. of false alarms No. of hits
In R console -> c f h
----------------------- ----------------------- ----------------------------- -------------
definitely present c[1] = 5 f[1] = F_5 = 1 h[1] = H_5 = 41
probably present c[2] = 4 f[2] = F_4 = 2 h[2] = H_4 = 22
equivocal c[3] = 3 f[3] = F_3 = 5 h[3] = H_3 = 14
subtle c[4] = 2 f[4] = F_2 = 11 h[4] = H_2 = 8
very subtle c[5] = 1 f[5] = F_1 = 13 h[5] = H_1 = 1

—————————————————————————————————

* false alarms = False Positives = FP

* hits = True Positives = TP

Note that in FROC data, all confidence level means present (diseased, lesion) case only, no confidence level indicating absent. Since each reader marks his suspicious location only if he thinks lesions are present, and marked positions generates the hits or false alarms, thus each confidence level represents that lesion is present. In the absent case, reader does not mark any locations and hence, the absent confidence level does not relate this dataset. So, if reader think it is no lesion, then in such case confidence level is not needed.

Note that the first column of confidence level vector c should not be specified. If specified, will be ignored , since it is created by c <-c(rep(C:1)) automatically in the inner program and do not refer from user input data even if it is specified explicitly, where C is the highest number of confidence levels. So you should check the compatibility of your data and the confidence level vector c <-c(rep(C:1)) via a table which can be displayed by the function viewdata().

—————————————————————————————

Multiple readers and multiple modalities case, i.e., MRMC case

—————————————————————————————

In case of multiple readers and multiple modalities, i.e., MRMC case, in order to apply the function fit_Bayesian_FROC(), dataset represented by an R list object representing FROC data must contain components m,q,c,h,f,NL,C,M,Q.

C

A positive integer, representing the highest number of confidence level, this is a scalar.

M

A positive integer vector, representing the number of modalities.

Q

A positive integer, representing the number of readers.

m

A vector of positive integers, representing the modality ID vector.

q

A vector of positive integers, representing the reader ID vector.

c

A vector of positive integers, representing the confidence level. This vector must be made by rep(rep(C:1), M*Q)

h

A vector of non-negative integers, representing the number of hits.

f

A vector of non-negative integers, representing the number of false alarms.

NL

A positive integer, representing the Total number of lesions for all images, this is a scalar.

Note that the maximal number of confidence level (denoted by C) are included in the above R object. However, each confidence level vector is not included in the data, because it is created automatically from C. To confirm false positives and hits are correctly ordered with respect to the automatically generated confidence vector,

the function viewdata() shows the table. Revised 2019 Nov 27 Revised 2019 Dec 5

Example data.

Multiple readers and multiple modalities ( i.e., MRMC)

—————————————————————————————————

Modality ID Reader ID Confidence levels No. of false alarms No. of hits.
m q c f h
-------------- ------------- ------------------------ ------------------- ----------------
1 1 3 20 111
1 1 2 29 55
1 1 1 21 22
1 2 3 6 100
1 2 2 15 44
1 2 1 22 11
2 1 3 6 66
2 1 2 24 55
2 1 1 23 1
2 2 3 5 66
2 2 2 30 55
2 2 1 40 44

—————————————————————————————————

* false alarms = False Positives = FP

* hits = True Positives = TP

StanS4class

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


BayesianFROC documentation built on Jan. 23, 2022, 9:06 a.m.