[Diagnosismed-commits] r9 - in pkg/DiagnosisMed: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 15 04:02:55 CET 2009
Author: pedrobrasil
Date: 2009-03-15 04:02:55 +0100 (Sun, 15 Mar 2009)
New Revision: 9
Modified:
pkg/DiagnosisMed/DESCRIPTION
pkg/DiagnosisMed/R/ROC.r
pkg/DiagnosisMed/man/ROC.Rd
Log:
Modified: pkg/DiagnosisMed/DESCRIPTION
===================================================================
--- pkg/DiagnosisMed/DESCRIPTION 2009-03-04 12:27:23 UTC (rev 8)
+++ pkg/DiagnosisMed/DESCRIPTION 2009-03-15 03:02:55 UTC (rev 9)
@@ -1,6 +1,6 @@
Package: DiagnosisMed
-Version: 0.1.2.1
-Date: 2009-03-03
+Version: 0.1.2.3
+Date: 2009-03-13
Author: Pedro Brasil <pedro.brasil at ipec.fiocruz.br>
Maintainer: Pedro Brasil <pedro.brasil at ipec.fiocruz.br>
Depends: R (>= 2.7.2),epitools,epicalc, TeachingDemos, tcltk
Modified: pkg/DiagnosisMed/R/ROC.r
===================================================================
--- pkg/DiagnosisMed/R/ROC.r 2009-03-04 12:27:23 UTC (rev 8)
+++ pkg/DiagnosisMed/R/ROC.r 2009-03-15 03:02:55 UTC (rev 9)
@@ -50,17 +50,16 @@
X<-test[gold=="negative"] # pag 209
Y<-test[gold=="positive"] # pag 209
}
- m<-length(X) # pag 209
- n<-length(Y) # pag 209
+ m<-length(X) # pag 209
+ n<-length(Y) # pag 209
D10X<-function(Xi){(1/n)*sum(Y>=Xi)} # pag 211
D01Y<-function(Yi){(1/m)*sum(Yi>=X)} # pag 211
- VAR.AUC<-sum((tapply(X,X,"D10X")-AUC)^2)/(m*(m-1))+sum((tapply(Y,Y,"D01Y")-AUC)^2)/(m*(m-1))
- VAR.AUC<-(1/(m*(m-1)))*(sum((tapply(X,X,"D10X")-AUC)^2)+(1/(n*(n-1)))*sum((tapply(Y,Y,"D01Y")-AUC)^2)) # pag 211
+ VAR.AUC<-sum((tapply(X,X,"D10X")-AUC)^2)/(m*(m-1))+sum((tapply(Y,Y,"D01Y")-AUC)^2)/(n*(n-1)) # pag 211
SD.AUC<-sqrt(VAR.AUC)
alpha<-1-CL
AUC.summary<-c(AUC- qnorm(1-alpha/2)*SD.AUC,AUC,AUC+ qnorm(1-alpha/2)*SD.AUC)
names(AUC.summary)<-c("AUC inf conf limit", "AUC","AUC sup conf limit")
-
+
#TP sum(test.table[i:nrow(test.table),2])
#FP sum(test.table[i:nrow(test.table),1])
#TN sum(test.table[1:i-1,1])
Modified: pkg/DiagnosisMed/man/ROC.Rd
===================================================================
--- pkg/DiagnosisMed/man/ROC.Rd 2009-03-04 12:27:23 UTC (rev 8)
+++ pkg/DiagnosisMed/man/ROC.Rd 2009-03-15 03:02:55 UTC (rev 9)
@@ -88,8 +88,10 @@
automatically shows these columns below, therefore one has to be careful when
relating the corresponding lines. The AUC (area under the ROC curve) is estimated
by the trapezoidal method (also known as Mann-Whitney statistic), its confidence
- interval is estimated by DeLong method. The validity measures such as
- Sensitivity, Specificity and Likelihood ratios are estimated as
+ interval is estimated by DeLong method. The AUC confidence limits should be used only
+ to compare the AUC with the null value for AUC which is 0.5 and not to compare
+ the AUC from different tests. The validity measures such as Sensitivity,
+ Specificity and Likelihood ratios and its confidence limits are estimated as
in \code{\link{diagnosis}} function.
Diagnostic odds ratio: \eqn{DOR = (TP*TN)/(FN*FP); the same as: DOR = PLR/NLR}
More information about the Diagnosismed-commits
mailing list