# NOT RUN {
## Example 1
## Plot individual empirical ROC plots for all combinations of modalities
## 1 and 2 and readers 1, 2 and 3. Six operating characteristics are plotted.
ret <- PlotEmpiricalOperatingCharacteristics(dataset =
dataset02, trts = c(1:2), rdrs = c(1:3))
print(ret$Plot)
## Example 2
## Empirical ROC, FROC, AFROC and wAFROC plots. Each plot consists of
## three parts (see Example 3 for correspondences between indices and string identifiers
## for modalities and readers):
## (1) plot for the 1st modality (string ID "1") and the 2nd reader (string ID "3")
## (2) plot for the 2nd modality (string ID "2") AVERAGED over the 2nd and 3rd readers
## (string IDs "3" and "4"), and
## (3) plot AVERAGED over the first two modalities (string IDs "1" and "2") AND over
## the 1st, 2nd and 3rd readers (string IDs "1", "3" and "4")
plotT <- list(1, 2, c(1:2))
plotR <- list(2, c(2:3), c(1:3))
ret <- PlotEmpiricalOperatingCharacteristics(dataset = dataset04, trts = plotT, rdrs = plotR)
print(ret$Plot)
ret <- PlotEmpiricalOperatingCharacteristics(dataset = dataset04, trts = plotT, rdrs = plotR,
opChType = "FROC")
print(ret$Plot)
ret <- PlotEmpiricalOperatingCharacteristics(dataset = dataset04, trts = plotT, rdrs = plotR,
opChType = "AFROC")
print(ret$Plot)
ret <- PlotEmpiricalOperatingCharacteristics(dataset = dataset04, trts = plotT, rdrs = plotR,
opChType = "wAFROC")
print(ret$Plot)
##Example 3
## Correspondences between indices and string identifiers for modalities and
## readers in this dataset. Apparently reader "2" did not complete the study.
str(dataset04)
## List of 8
## $ NL : num [1:5, 1:4, 1:200, 1:7] -Inf -Inf -Inf -Inf -Inf ...
## $ LL : num [1:5, 1:4, 1:100, 1:3] 5 4 4 3 5 5 4 2 4 5 ...
## $ lesionNum : int [1:100] 1 1 1 1 1 1 1 1 1 1 ...
## $ lesionID : num [1:100, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
## $ lesionWeight: num [1:100, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
## $ dataType : chr "FROC"
## $ modalityID : chr [1:5] "1" "2" "3" "4" "5"
## $ readerID : chr [1:4] "1" "3" "4" "5"
# }
Run the code above in your browser using DataLab