The SENSPEC option in the TABLES statement provides estimates of sensitivity, specificity, positive predictive value, and negative predictive value for tables. These measures are conditional (row and column) proportions in the
crosstabulation table. In sensitivity analysis, the row variable might represent a positive or negative diagnostic test result, and the column variable might represent the presence or absence of a condition. For more information, see Fleiss, Levin, and Paik (2003). The SENSPEC option also provides an estimate of accuracy, which is the proportion of correct classifications.
By default, the SENSPEC computations use table cell (1,1) as the reference cell that represents the true positives (positive row value and positive column value). You can specify a different reference cell by using the SENSPEC REFCELL= suboption or the REFCOLUMN= and REFROW= suboptions. For example, REFCELL=4 specifies table cell (2,2) as the true-positive cell (and row 2 and column 2 as the positive row and column levels, respectively). The notation in this section assumes that table cell (1,1) is the reference cell.
Sensitivity is computed as the column proportion for table cell (1,1), which is the ratio of the frequency in table cell (1,1) to the total frequency in column 1 of the table. Sensitivity is denoted by
Specificity is computed as the column proportion for table cell (2,2), which is the ratio of the frequency in table cell (2,2) to the total frequency in column 2. Specificity is denoted as
The positive predictive value is the row proportion for table cell (1,1), which is computed as
The negative predictive value is the row proportion for table cell (2,2), which is computed as
Accuracy (correct classification rate) is the overall proportion in table cells (1,1) and (2,2), which is computed as
The "Sensitivity and Specificity" table provides the estimates together with their standard errors and Wald confidence limits. PROC FREQ computes the standard errors and Wald confidence limits for these proportions as described in the section Risks and Risk Differences. The value of the confidence coefficient is determined by the ALPHA= option; by default, ALPHA=0.05, which produces 95% confidence limits.