[R-sig-Epi] Diagnosis function

BXC (Bendix Carstensen) bxc at steno.dk
Tue Oct 16 00:34:30 CEST 2007


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


> -----Original Message-----
> From: r-sig-epi-bounces at stat.math.ethz.ch 
> [mailto:r-sig-epi-bounces at stat.math.ethz.ch] On Behalf Of 
> Pedro Emmanuel Alvarenga Americano do Brasil
> Sent: Monday, October 15, 2007 8:46 PM
> To: r-sig-epi at stat.math.ethz.ch
> Subject: [R-sig-Epi] Diagnosis function
> 
> Dear colegues of the R epidemiologic list,
> 
> I was looking for some functions to analyse some data about 
> diagnostic test and unfortunately there was not somethig that 
> I expected. However I found a function called SensSpec at 
> epibasix library.
> 
> What came to my attention is that the example given by the 
> author give a sensitivity of about 96% and a confidence 
> interval o 88 to 104?!??! How come a result that should vary 
> between 0 and 100 could have a confidence interval of 104? 
> There is any way to propose a correction? Also this functions 
> does not give predictive values, likelihood ratios, dor, and AUC.
> 
> Does anyone have or know about any functions to work on 
> diagnostic tests?
> 
> Best regards,
> Pedro Emmanuel A. A. do Brasil
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Epi at stat.math.ethz.ch mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-epi
> 



More information about the R-sig-Epi mailing list