Skip to content

seungjae2525/MRMCbinary

Repository files navigation

MRMCbinary

minimal R version CRAN status metacran downloads Project Status Lifecycle: stable R-CMD-check

Multi-Reader Multi-Case Analysis of Binary Diagnostic Tests

Description

This is the source code for the MRMCbinary package in R. MRMCbinary is a package aimed at comparing the diagnostic performance of different modalities (i.e., sensitivities and specificities) in multi-reader multi-case (MRMC) studies with binary diagnostic test results.

Reference

Lee, S., Jang, S., and Lee, W. Evaluating Diagnostic Accuracy of Binary Medical Tests in Multi-Reader Multi-Case Study. Statistics in Medicine. 45(6-7). e70471. https://doi.org/10.1002/sim.70471

Installation

The latest release version from CRAN:

install.packages("MRMCbinary")
library(MRMCbinary)

Current GitHub release:

Installation using R package devtools:

if (!require("devtools")) { install.packages("devtools") } # if devtools not already installed
devtools::install_github("seungjae2525/MRMCbinary")
library(MRMCbinary)

Example

This is a basic example which shows you how to use MRMCbinary package:

## Load MRMCbinary package
library(MRMCbinary)

## Load example data
data(VanDyke)

## Return the first parts of an object
head(VanDyke)

## Extract unique modalities
unique(VanDyke$treatment)

## Extract Unique readers
unique(VanDyke$reader)

## Create binary test results (Y_ijk)
VanDyke$Y <- as.numeric(VanDyke$rating >= 3)

## Example usage of MRMCbinary function:
# When comparing the sensitivities and specificities between modalities
modality_result <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                              Case = case, D = truth, Y = Y, measure = "All",
                              effect = "Modality", interaction = NULL,
                              reference.Modality = "1", reference.Reader = NULL)
print(modality_result)
summary(modality_result, digits = 3)

# When comparing the sensitivities between modalities
#  The warning appears because the input data contain non-diseased cases (D = 0),
#  but analysis is performed using only diseased cases (D = 1)
modality_sens_result <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                                   Case = case, D = truth, Y = Y, measure = "Sensitivity",
                                   effect = "Modality", interaction = NULL,
                                   reference.Modality = "1", reference.Reader = NULL)
print(modality_sens_result)
summary(modality_sens_result, digits = 3)

# When comparing the specificities between modalities
#  The warning appears because the input data contain diseased cases (D = 1),
#  but analysis is performed using only non-diseased cases (D = 0)
modality_spec_result <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                                   Case = case, D = truth, Y = Y, measure = "Specificity",
                                   effect = "Modality", interaction = NULL,
                                   reference.Modality = "1", reference.Reader = NULL)
print(modality_spec_result)
summary(modality_spec_result, digits = 3)

# When comparing the sensitivities and specificities between readers
reader_result <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                            Case = case, D = truth, Y = Y, measure = "All", 
                            effect = "Reader", interaction = NULL,
                            reference.Modality = NULL, reference.Reader = "1")
print(reader_result)
summary(reader_result, digits = 3)

# When comparing the sensitivities and specificities between modalities and between readers together
#  not considering interaction between modalities and readers
both_result_wo_int <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                                 Case = case, D = truth, Y = Y, measure = "All", 
                                 effect = "Both", interaction = FALSE,
                                 reference.Modality = "1", reference.Reader = "1")
print(both_result_wo_int)
summary(both_result_wo_int, digits = 3)

# When comparing the sensitivities and specificities between modalities and between readers together
#  considering interaction between modalities and readers
both_result_with_int <- MRMCbinary(data = VanDyke, Modality = treatment, Reader = reader,
                                   Case = case, D = truth, Y = Y, measure = "All", 
                                   effect = "Both", interaction = TRUE,
                                   reference.Modality = "1", reference.Reader = "1")
print(both_result_with_int)
summary(both_result_with_int, digits = 3)

Bug Reports:

You can also report bugs on GitHub under Issues.

About

Multi-Reader Multi-Case Analysis of Binary Diagnostic Tests

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Contributors

Languages