Bayesian Epidemiologic Screening Techniques

Graduate Group in Epidemiology | University of California, Davis
| Bayesian Epidemiologic Screening Techniques (BEST) Laboratory at University of California, Davis |
| Software Modules | Prevalence Estimation | Disease Freedom | Diagnostic Test Se and Sp Estimation | More |
| Methodological Papers | Applications |
| Presentations and Talks |
| Workshops |
| Statistics | Medicine and Epidemiology | Master of Preventive Veterinary Medicine |
| Glossary of Epidemiological Terms |
| Academic / Research Related | Scientific Journals | Software Sites | Web-based Hot Topics and Lists |
| Research Members Contact Information |

3 tests, 1 population, no gold standard

WinBUGS 1.4 code to accompany the paper entitled "Branscum AJ, Gardner IA, Johnson WO. Estimation of diagnostic-test sensitivity and specificity through Bayesian modeling. Prev Vet Med. 2005 May 10;68(2-4):145-63".

Code prepared by Adam Branscum, November 18, 2003
branscum@ms.uky.edu
Departments of Biostatistics and Statistics
University of Kentucky

Example from section 3.4.2.
Three tests (two dependent tests; one test independent of these two) / One population.
Estimation of Se and Sp of two FAT tests given a third conditionally independent test, virus isolation (VI).
Classical swine fever virus.
Data source: Bouma A, Stegeman JA, Engel B, de Kluijver EP, Elbers AR, De Jong MC. Evaluation of diagnostic tests for the detection of classical swine fever in the field without a gold standard. J Vet Diagn Invest. 2001 Sep;13(5):383-8.



model;
{
y[1:K, 1:K, 1:K] ~ dmulti(p[1:K, 1:K, 1:K], n)
p[1,1,1] <- pi*SeVI*(Sefat1*Sefat2+covDp) + (1-pi)*(1-SpVI)*((1-Spfat1)*(1-Spfat2)+covDn)
p[1,2,1] <- pi*SeVI*(Sefat1*(1-Sefat2)-covDp) + (1-pi)*(1-SpVI)*((1-Spfat1)*Spfat2-covDn)
p[1,1,2] <- pi*(1-SeVI)*(Sefat1*Sefat2+covDp) + (1-pi)*SpVI*((1-Spfat1)*(1-Spfat2)+covDn)
p[1,2,2] <- pi*(1-SeVI)*(Sefat1*(1-Sefat2)-covDp) + (1-pi)*SpVI*((1-Spfat1)*Spfat2-covDn)
p[2,1,1] <- pi*SeVI*((1-Sefat1)*Sefat2-covDp) + (1-pi)*(1-SpVI)*(Spfat1*(1-Spfat2)-covDn)
p[2,2,1] <- pi*SeVI*((1-Sefat1)*(1-Sefat2)+covDp) + (1-pi)*(1-SpVI)*(Spfat1*Spfat2+covDn)
p[2,1,2] <- pi*(1-SeVI)*((1-Sefat1)*Sefat2-covDp) + (1-pi)*SpVI*(Spfat1*(1-Spfat2)-covDn)
p[2,2,2] <- pi*(1-SeVI)*((1-Sefat1)*(1-Sefat2)+covDp) + (1-pi)*SpVI*(Spfat1*Spfat2+covDn)
ls <- (Sefat1-1)*(1-Sefat2)
us <- min(Sefat1,Sefat2) - Sefat1*Sefat2
lc <- (Spfat1-1)*(1-Spfat2)
uc <- min(Spfat1,Spfat2) - Spfat1*Spfat2
rhoD <- covDp / sqrt(Sefat1*(1-Sefat1)*Sefat2*(1-Sefat2))
rhoDc <- covDn / sqrt(Spfat1*(1-Spfat1)*Spfat2*(1-Spfat2))
pi ~ dbeta(13.322, 6.281) ## Mode=0.70, 95% sure > 0.50
Sefat1 ~ dbeta(9.628,3.876) ## Mode=0.75, 95% sure > 0.50
Spfat1 ~ dbeta(15.034, 2.559) ## Mode=0.90, 95% sure > 0.70
Sefat2 ~ dbeta(9.628, 3.876) ## Mode=0.75, 95% sure > 0.50
Spfat2 ~ dbeta(15.034, 2.559) ## Mode=0.90, 95% sure > 0.70
SeVI ~ dbeta(15.034, 2.559) ## Mode=0.90, 95% sure > 0.70
SpVI ~ dbeta(151.769, 4.077) ## Mode=0.98, 95% sure > 0.95
covDn ~ dunif(lc, uc)
covDp ~ dunif(ls, us)
}
list(n=214, K=2)
list(pi=0.70, Sefat1=0.75, Spfat1=0.90, Sefat2=0.75, Spfat2=0.90, SeVI=0.90, SpVI=0.98)
y[,1,1] y[,1,2] y[,2,1] y[,2,2]
96 25 3 3
12 4 4 67
END
 

Output

node
mean
sd
MC error
2.50%
median
97.50%
start
sample
SeVI
0.8339
0.042
3.80E-04
0.7538
0.8328
0.9204
10001
100000
Sefat1
0.8476
0.03171
1.42E-04
0.7817
0.849
0.9054
10001
100000
Sefat2
0.9228
0.02507
1.53E-04
0.8681
0.925
0.9656
10001
100000
SpVI
0.9764
0.01124
4.44E-05
0.95
0.9781
0.9933
10001
100000
Spfat1
0.8896
0.04907
6.49E-04
0.7806
0.895
0.969
10001
100000
Spfat2
0.8944
0.05052
6.81E-04
0.7812
0.9004
0.9747
10001
100000
rhoD
0.2827
0.1449
7.42E-04
-0.0085
0.2862
0.5535
10001
100000
rhoDc
0.5822
0.2195
0.002261
0.05866
0.6257
0.8979
10001
100000

 

©2000-2007 Department of Medicine and Epidemiology, University of California, Davis