Division of General Internal Medicine

Department Home >

  • Base >
  • You are here
Division of General Internal Medicine

Stata Programs: Roc Analysis

1. 95% Confidence Intervals For Sensitivity, Specificity, and Likelihood Ratios
  • dtestci.do contains two programs related to deriving 95% CI for sensitivity, specificity, LR+, and LR- for a dichotomous test. The first, sespci_i is an immediate form program that calculates sensitivity, specificity, the 2 LR, and 95% CI for each. The second, sespcidoc, provides brief documentation for the program. (Revised 1/17/07)

2. ROC ANALYSIS
  • nrocarea.do contains two programs related to ROC curves. The first, rocintercept, estimates the optimal sensitivity and specificity (tangency of OOS and ROC curve) and the intercept of the tangent line. The second, testchar, calculates sensitivities, specificities, and stratum-specific likelihood ratios (plus confidence intervals) for the operating points that define the convex hull of the ROC curve. nrocarea also has 3 utility programs used to cumulate test results (cumval), calculate 95% CI for single proportions (pro95ci), and calculate 95% CI for SSLR (lrci). Finally, there is a utility program, nrocdoc, that provides brief documentation for the program.

  • bsrocarea2.do provides a program for bootstrapping the optimal sensitivity and specificity; as well as the intercept of the tangent line. Bootstrapping the intercept yields a standard error, which allows statistical comparison of the intercepts from competing tests

  • sslrprog.do provides a program (sslr) for estimating stratum-specific likelihood ratios and their 95% CI for a test characterized by between 2 and 50 ordered categorical outcomes. It also provides a program, sslrdoc, that provides brief documentation for the program