Related Experiment Video
Updated: Jun 8, 2025

Evaluation of a Point-of-Care Testing Analyzer for Measuring Peripheral Blood Leukocytes
Published on: March 22, 2022
testCompareR: an R package to compare two binary diagnostic tests using paired data
Kyle J Wilson1,2, José A Roldán-Nofuentes3, Marc Y R Henrion2,4
1University of Liverpool, Liverpool, L7 8TX, UK.
Background:
Binary diagnostic tests are commonly used in medicine to answer a question about a patient's clinical status, most commonly, do they or do they not have some disease. Recent advances in statistical methodologies for performing inferential statistics to compare commonly used test metrics for two diagnostic tests have not yet been implemented in a statistical package.
Methods:
Up-to-date statistical methods to compare the test metrics achieved by two binary diagnostic tests are implemented in the new R package testCompareR. The output and efficiency of testCompareR is compared to the only other available package which performs this function, DTComPair, as well as an open-source program, compbdt, using a motivating example.
Results:
testCompareR achieves similar results to DTComPair using statistical methods with improved coverage and asymptotic performance. Further, testCompareR is faster than the currently available package and requires fewer pre-processing steps in order to produce accurate results.
Conclusions:
testCompareR provides a new tool to compare the test metrics for two binary diagnostic tests compared with the gold standard. This tool allows flexible inputs, which minimises the need for data pre-processing, and operates in very few steps, so that it is easy to use even for those less experienced with R. testCompareR achieves results comparable to those computed by DTComPair, using optimised statistical methods and with improved computational efficiency.
Related Concept Videos
Sign Test for Matched Pairs
To conduct the sign test, we first calculate the differences in...
Comparing the Survival Analysis of Two or More Groups
Wilcoxon Signed-Ranks Test for Matched Pairs
Multiple Comparison Tests
It would be easy to compare two samples using a significance alpha level of 0.05. In other words, there is only one sample pair to be compared. However, it would be difficult to identify a significantly different sample if the number...
Bonferroni Test
The means of different samples are first paired in all possible combinations.
The null hypothesis of the...
Comparing Experimental Results: Student's t-Test

