{"id":166,"date":"2023-12-22T14:22:38","date_gmt":"2023-12-22T14:22:38","guid":{"rendered":"https:\/\/simplesage.io\/blog\/?p=166"},"modified":"2023-12-22T14:25:42","modified_gmt":"2023-12-22T14:25:42","slug":"roc_curves_and_auc","status":"publish","type":"post","link":"https:\/\/simplesage.io\/blog\/roc_curves_and_auc\/","title":{"rendered":"Understanding Receiver Operating Curves and the AUC: A Guide for Clinicians"},"content":{"rendered":"\n<p>For clinicians, understanding the diagnostic accuracy of the tests we order is vital. Often, test results are continuous, necessitating a dichotomous categorization into &#8216;disease present&#8217; or &#8216;disease absent&#8217;. This decision hinges on setting an appropriate cut-off value at which we call the test a \u2018positive\u2019 result. The Receiver Operating Characteristic (ROC) curve is a fundamental tool to visualize the trade off between sensitivity and specificity at different thresholds of test positivity.<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The Basics: Sensitivity, Specificity, and the Decision Matrix<\/strong><\/h2>\n\n\n\n<p>To grasp ROC curves, we first need to understand sensitivity and specificity. Sensitivity measures the proportion of actual disease cases correctly identified by the test while specificity refers to the correct identification of non-disease cases (see formulas below). A perfect test would have a sensitivity and specificity of 1.0 (or 100%) but this does not occur in the real world.<\/p>\n\n\n\n<p> <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"102\" src=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Sensitivity-1024x102.png\" alt=\"Sensitivity formula. Sensitivity equals true positives divided by true positives plus false negatives\" class=\"wp-image-167\" srcset=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Sensitivity-1024x102.png 1024w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Sensitivity-300x30.png 300w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Sensitivity-768x76.png 768w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Sensitivity.png 1520w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"107\" src=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Specificity-1024x107.png\" alt=\"Specificity formula showing specificity is equal to true negatives divided by true negatives and false positives \" class=\"wp-image-168\" srcset=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Specificity-1024x107.png 1024w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Specificity-300x31.png 300w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Specificity-768x80.png 768w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Specificity.png 1459w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is an ROC Curve?<\/strong><\/h2>\n\n\n\n<p>The ROC curve, developed during World War II for signal detection, now serves as a key tool in medical diagnostics. It plots sensitivity (true positive rate) against 1 &#8211; specificity (false positive rate) for various cut-off values of a test, helping to identify the <strong>optimal balance between sensitivity and specificity<\/strong>.<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Types of ROC curves<\/strong><\/h3>\n\n\n\n<p>ROC curves are either nonparametric (empirical) or parametric. The nonparametric ROC curve, commonly used in medicine, does not assume a specific distribution of test results and appears as a jagged line. The parametric curve, smoother in appearance, assumes a normal distribution of test results.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"664\" src=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-1024x664.png\" alt=\"Parametric vs. non-parametric ROC curves plotted in red and blue \" class=\"wp-image-169\" style=\"width:840px;height:auto\" srcset=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-1024x664.png 1024w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-300x195.png 300w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-768x498.png 768w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-1536x997.png 1536w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Parametric-vs.-Non-Parametric-ROC-Curves-2048x1329.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p> <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Drawing a ROC curve<\/h3>\n\n\n\n<p>Consider a scenario with ten patients undergoing a cancer marker test. As the cut-off value to determine whether the patient has cancer is adjusted, the sensitivity and specificity vary, allowing the plotting of these points on a graph. For example, we could make the test very sensitive and have very few false negatives, but this might come at the expense of false positives. The resulting curve helps visualize the trade-off between sensitivity and specificity.<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The importance of AUC (area under the curve)<\/strong><\/h2>\n\n\n\n<p>AUC quantifies the overall accuracy of a diagnostic test. An AUC of 1.0 signifies a perfect test, while an AUC of 0.5 indicates no diagnostic utility. Generally, an AUC above 0.8 is deemed acceptable for a diagnostic test, but this varies depending on the role of the test in the clinical pathway.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Area under the Curve (AUC)<\/th><th>Interpretation<\/th><\/tr><\/thead><tbody><tr><td>0.9 \u2264 AUC<\/td><td>Excellent<\/td><\/tr><tr><td>0.8 \u2264 AUC &lt; 0.9<\/td><td>Good<\/td><\/tr><tr><td>0.7 \u2264 AUC &lt; 0.8<\/td><td>Fair<\/td><\/tr><tr><td>0.5 \u2264 AUC &lt; 0.7<\/td><td>Poor<\/td><\/tr><tr><td>AUC &lt; 0.5<\/td><td>Unacceptable <\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/ekja.org\/journal\/view.php?doi=10.4097\/kja.21209\" data-type=\"link\" data-id=\"https:\/\/ekja.org\/journal\/view.php?doi=10.4097\/kja.21209\">AUC threshold clinical interpretations <\/a><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Determining the Optimal Cut-off Value<\/strong><\/h3>\n\n\n\n<p>The optimal cut-off value is not merely about maximizing sensitivity and specificity but finding a suitable balance based on the clinical context. Various methods, such as <a href=\"https:\/\/analyse-it.com\/docs\/user-guide\/diagnostic-performance\/youden-j\">Youden\u2019s J statistic<\/a>, <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pmc\/articles\/PMC5470053\/\">Euclidean distance<\/a>, and cost approaches, help in determining this value.<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Statistical Programs for ROC Analysis<\/strong><\/h3>\n\n\n\n<p>Various commercial programs (R, SPSS) exist to generate ROC curves. I recommend using the <a href=\"https:\/\/jasp-stats.org\/\">free software JASP<\/a> which is super simple to use \u2013 you can just put in the values and automatically generate curves. No programming required! &nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"660\" data-id=\"170\" src=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/JASP-ROC-Curve-Input.png\" alt=\"JASP data input console \" class=\"wp-image-170\" srcset=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/JASP-ROC-Curve-Input.png 632w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/JASP-ROC-Curve-Input-287x300.png 287w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"370\" height=\"370\" data-id=\"180\" src=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Picture2.jpg\" alt=\"ROC Curve Showing True Positive Rate (sensitivity) and False Positive Rate (1-specificity)\" class=\"wp-image-180\" srcset=\"https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Picture2.jpg 370w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Picture2-300x300.jpg 300w, https:\/\/simplesage.io\/blog\/wp-content\/uploads\/2023\/12\/Picture2-150x150.jpg 150w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/figure>\n<\/figure>\n\n\n\n<p> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>ROC curves are helpful for clinicians to understand the tradeoff between sensitivity and specificity for different test positivity thresholds. The AUC is a valuable test metric that encompasses the overall accuracy of the test. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Wanting to learn more about research methods?  Continue reading about what a <a href=\"https:\/\/simplesage.io\/blog\/what-is-a-p-value-and-what-a-p-value-is-not\/\" data-type=\"link\" data-id=\"https:\/\/simplesage.io\/blog\/what-is-a-p-value-and-what-a-p-value-is-not\/\">P-value is (and what a P-value is not!)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For clinicians, understanding the diagnostic accuracy of the tests we order is vital. Often, test results are continuous, necessitating a dichotomous categorization into &#8216;disease present&#8217; or &#8216;disease absent&#8217;. This decision hinges on setting an appropriate cut-off value at which we call the test a \u2018positive\u2019 result. The Receiver Operating Characteristic (ROC) curve is a fundamental [&hellip;] <a class=\"link-secondary\" href=\"https:\/\/simplesage.io\/blog\/roc_curves_and_auc\/\" title=\"Permanent Link to: Understanding Receiver Operating Curves and the AUC: A Guide for Clinicians\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":2,"featured_media":173,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[7],"class_list":["post-166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-methods","tag-statistical-testing"],"_links":{"self":[{"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":6,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions\/183"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/media\/173"}],"wp:attachment":[{"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simplesage.io\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}