%diag_test: a generic SAS macro for evaluating diagnostic accuracy measures for multiple diagnostic tests
Related Experiment Video
Updated: Jun 2, 2025

A Machine Learning Approach to Design an Efficient Selective Screening of Mild Cognitive Impairment
Published on: January 11, 2020
Jacques K Muthusi1, Peter W Young2, Frankline O Mboya3
1Division of Global HIV and Tuberculosis, Global Health Centre, U.S. Centres for Disease Control and Prevention, P.O. Box 606 - 00621, Nairobi, Kenya. mwj6@cdc.gov.
Background:
Measures of diagnostic test accuracy provide evidence of how well a test correctly identifies or rules-out disease. Commonly used diagnostic accuracy measures (DAMs) include sensitivity and specificity, predictive values, likelihood ratios, area under the receiver operator characteristic curve (AUROC), area under precision-recall curves (AUPRC), diagnostic effectiveness (accuracy), disease prevalence, and diagnostic odds ratio (DOR) etc. Most available analysis tools perform accuracy testing for a single diagnostic test using summarized data. We developed a SAS macro for evaluating multiple diagnostic tests using individual-level data that creates a 2 × 2 summary table, AUROC and AUPRC as part of output.
Methods:
The SAS macro presented here is automated to reduce analysis time and transcription errors. It is simple to use as the user only needs to specify the input dataset, "standard" and "test" variables and threshold values. It creates a publication-quality output in Microsoft Word and Excel showing more than 15 different accuracy measures together with overlaid AUROC and AUPRC graphics to help the researcher in making decisions to adopt or reject diagnostic tests. Further, it provides for additional variance estimation methods other than the normal distribution approximation.
Results:
We tested the macro for quality control purposes by reproducing results from published work on evaluation of multiple types of dried blood spots (DBS) as an alternative for human immunodeficiency virus (HIV) viral load (VL) monitoring in resource-limited settings compared to plasma, the gold-standard. Plasma viral load reagents are costly, and blood must be prepared in a reference laboratory setting by a qualified technician. On the other hand, DBS are easy to prepare without these restrictions. This study evaluated the suitability of DBS from venous, microcapillary and direct spotting DBS, hence multiple diagnostic tests which were compared to plasma specimen. We also used the macro to reproduce results of published work on evaluating performance of multiple classification machine learning algorithms for predicting coronary artery disease.
Conclusion:
The SAS macro presented here is a powerful analytic tool for analyzing data from multiple diagnostic tests. The SAS programmer can modify the source code to include other diagnostic measures and variance estimation methods. By automating analysis, the macro adds value by saving analysis time, reducing transcription errors, and producing publication-quality outputs.
More Related Videos
09:00Author Spotlight: Validation of SICOLE-R for Assessing Cognitive and Reading Skills in Spanish-Speaking Children and Its Role in Personalized Education
Published on: August 16, 2024
07:35Selecting Multiple Biomarker Subsets with Similarly Effective Binary Classification Performances
Published on: October 11, 2018
Related Concept Videos
Receiver Operating Characteristic Plot
Sensitivity, Specificity, and Predicted Value
Sensitivity is the...
Statistical Analysis System (SAS)
Applications: SAS finds applications in numerous fields, including healthcare for clinical trial analysis, finance for risk assessment, marketing for customer data analysis, and...
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...
Comparing the Survival Analysis of Two or More Groups
Testing a Claim about Standard Deviation
The hypothesis testing for the claim of population standard deviation (or variance) requires the data and samples to be random and unbiased. The population distribution also must be normal. There is no specific requirement on the sample size as the estimation is based on the chi-square distribution.
As a first step, the hypothesis (null and alternative) concerning the claim about...