Skip to content
Prev 88 / 585 Next

Diagnosis function

Pedro,

The major part of evaluation of senitivity and specificity and
predictive values is computation of probabilities and their c.i.s.

The formulae in "epibasix" are asymtotic, and give horrendous results
for extreme data. It is in general bad practice to implement method
designed for hand-calculation (50 years ago) when a computer is actually
available.

The twoby2() function in the Epi package uses a normal approximation  to
the logit of the probability, which gives excellent coverage and always
c.i.s inside [0,1]. It used the function ci.pd() from Epi to compute
confidence intervals for probability differences.

For illustration, try the following:

library(epibasix)
library(Epi)
example(sensSpec)
# now we have the matrix "dat", so annotate it properly:
colnames(dat) <- c("Dis","non-Dis")
rownames(dat) <- c("Test+","Test-")
# For sensitivity and (1-)specificity:
twoby2(t(dat))
# For the predictive values:
twoby2(dat)

The Epi-package contains a function called "ROC" that draws ROC curves.

Best,
Bendix

Note: The Epi package on CRAN will really soon be updated. The latest
version, 0.9.6, is available in: www.biostat.ku.dk/~bxc/Epi/Archive. We
are just reviewing it to see if any major blunders have crept in.
______________________________________________

Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2-4
DK-2820 Gentofte
Denmark
+45 44 43 87 38 (direct)
+45 30 75 87 38 (mobile)
+45 44 43 73 13 (fax)
bxc at steno.dk   http://www.biostat.ku.dk/~bxc