%diag_test: a generic SAS macro for evaluating diagnostic accuracy measures for multiple diagnostic tests - Jacques K. Muthusi; Peter W. Young; Frankline O. Mboya; Samuel M. Mwalili (BMC Medical Informatics and Decision Making)
Abstract 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.