Upload
ayi-furqon
View
31
Download
2
Embed Size (px)
DESCRIPTION
Laboratory technology and development trick
Citation preview
Sensitivity & Specificity
Categorical Data Analysis (CHL5210)Tutorial Presentation
Andy (Ai) NiOct 9, 2007
Sensitivity & Specificity
Measure how ‘good’ a test is at detecting binary features of interest (disease/no disease)
Sensitivity & Specificity
There are 100 people with 30 having disease A
A test designed to identify who has the disease and who does not
We want to evaluate how good the test is
Sensitivity & Specificity
Disease+
Disease-
Total
Test+
25 2 27
Test-
5 68 73
Total 30 70 100
Sensitivity & Specificity
25/30sensitivity
68/70specificity
Disease+
Disease-
Total
Test+
25 2 27
Test-
5 68 73
Total 30 70 100
Sensitivity & Specificity
Sensitivity = P (test+ | disease+)
Specificity = P (test- | disease-)
Sensitivity & Specificity
Usually the ‘true’ disease status is determined by some ‘gold standard’ method
For a specific test, sensitivity increases as specificity decreases and vice versa
Sensitivity & Specificity
Is a test perfect if it has high sensitivity AND high specificity?
Suppose there are 1 million people with 0.1% infected with HIV
A test can identify HIV infected people with 99.9% sensitivity and 99.9% specificity
Sensitivity & Specificity
HIV+
HIV-
Total
Test+
999 999 1,998
Test-
1 998,001 998,002
Total 1,000 999,000 1,000,000
Sensitivity & Specificity
999/1,998
PPV998,001/998,002
NPV
HIV+
HIV-
Total
Test+
999 999 1,998
Test-
1 998,001 998,002
Total 1,000 999,000 1,000,000 0.1%Prevalence
Sensitivity & Specificity
Positive Predictive Value (PPV)
= P (disease+ | test+)
Negative Predictive Value (NPV)
= P (disease- | test-)
Prevalence = P (disease+)
Sensitivity & Specificity
The lower the prevalence, the lower the PPV, and the higher the NPV
The higher the prevalence, the higher the PPV, and the lower the NPV
Sensitivity & Specificity
Type I error = P (reject Ho | Ho+)
Sensitivity & Specificity
Type I error = P (reject Ho | Ho+)
= 1 – P (accept Ho | Ho+)
Sensitivity & Specificity
Type I error = P (reject Ho | Ho+)
= 1 – P (accept Ho | Ho+)
Disease -test -
Sensitivity & Specificity
Type I error = P (reject Ho | Ho+)
= 1 – P (accept Ho | Ho+)
So type I error is in fact (1 – specificity)
Disease -test -
Sensitivity & Specificity
Power = 1 – Type II error
Sensitivity & Specificity
Power = 1 – Type II error = 1 – P (accept Ho | Ho-)
Sensitivity & Specificity
Power = 1 – Type II error = 1 – P (accept Ho | Ho-)
= P (reject Ho | Ho-)
Sensitivity & Specificity
Power = 1 – Type II error = 1 – P (accept Ho | Ho-)
= P (reject Ho | Ho-)
Disease+Test+
Sensitivity & Specificity
Power = 1 – Type II error = 1 – P (accept Ho | Ho-)
= P (reject Ho | Ho-)
So power is in fact sensitivity
Disease+Test+
Sensitivity & Specificity
SAS code There is no direct procedure for
sensitivity and specificity Use proc freq to do the job
Sensitivity & Specificity
To get the 2X2 table
data sample; input Test Disease Count;datalines;0 0 6 0 1 2 1 0 4 1 1 11;run;
proc freq data=sample;weight Count;tables Test*Disease;run;
Sensitivity & Specificity
To get the CI and test
title ‘sensitivity’;
proc freq data=sample;
where Disease=1;
weight Count;
tables Test;
exact binomial;
run;