Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65123

Sensitivity and specificity using roctab

$
0
0
Hi everybody,

I am using Stata to calculate the sensitivity and specificity of a diagnostic test (Amsel score) compared to the golden standard test Nugent score.

Code:
tab BVbyAmsel highnugent, chi2
roctab BVbyAmsel highnugent, detail
The resulting table is
Code:
           |      highnugent
 BVbyAmsel |         0          1 |     Total
-----------+----------------------+----------
         0 |       192         66 |       258 
         1 |         6        137 |       143 
-----------+----------------------+----------
     Total |       198        203 |       401
If I use roctab, the results given are:
Code:
                                            Correctly
Cutpoint      Sensitivity   Specificity   Classified          LR+          LR-
------------------------------------------------------------------------------
( >= 0 )          100.00%         0.00%       35.66%       1.0000     
( >= 1 )           95.80%        74.42%       82.04%       3.7451       0.0564
( >  1 )            0.00%       100.00%       64.34%                    1.0000
So, a sensitivity of 95.80% and a specificity of 74.42%. But if I calculate by hand, I get the following results:

True positive: 137
False positive: 6
True negative: 192
False negative: 66

Sensitivity: TP / (TP + FN) = 137 / (137 + 66) = 67.49%
Specificity: TN / (TN + FP) = 192 / (192 + 6) = 96.97%
Positive predictive value: TP / (TP + FP) = 137 / (137 + 6) = 95.80%
Negative predictive value: TN / (TN + FN) = 192 / (192 + 66) = 74.42%

I have the impression I must have made a mistake somewhere, but I cannot find out how and why. Thank you for your help! I am using Stata 13.0.

Kindly, Marijn

Viewing all articles
Browse latest Browse all 65123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>