[R-sig-Epi] Incorrect instructions for epibasix sensSpec?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Feb 1 23:04:36 CET 2010


Amy Mikhail wrote:
> Dear R epidemiologists,
> 
> The package help for the above function states:
> 
> Arguments X A 2x2 matrix, with Gold Standard Class A and B in the columns
> and Comparison Method A and B in the rows.
> I understood this to mean the following:
> 
>                                    Gold standard
> Comparison method         A (neg)     B (pos)
> A  (neg)                          18             1
> B   (pos)                          0              201
> 
> However, it gives the results backwards:
> 
>  sensSpec(t1)
> 
>  Simple Sensitivity and Specitivity Output
> 
> Input Matrix:
>           ref
> r1a        negative positive
>   negative       18        1
>   positive        0      201
> 
> The sample of sensitivity is: 100%
> 
> The sample of specificity is: 99.5%
> 
> but if you calculate the sensitivity and specificity by hand, sensitivity is
> 99.5 and specificity is 100%....
> 

That depends on the definition of negative and positive.

The documentation is certainly unclear, but it seems likely that the 
intention is for the table to have positives in the first row and 
column. Have you consulted the reference given? (Notably, the example 
table.)


-- 
    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-sig-Epi mailing list