ROCwoGS-package: Non-parametric estimation of ROC curves without Gold Standard

Description Details Author(s) References Examples

Description

Function to estimate the ROC Curve of a continuous-scaled diagnostic test with the help of a second imperfect diagnostic test with binary responses.

Details

Package: ROCwoGS
Type: Package
Version: 1.0
Date: 2010-09-13
License: GPL (>= 2)
LazyLoad: no

This package contains one function.NPROCwoGS estimates the ROC Curve of a continuous-scaled diagnostic test with the help of a second imperfect diagnostic test with binary responses

Author(s)

Chong Wang <chwang@iastate.edu>

Maintainer: Chong Wang <chwang@iastate.edu>

References

Wang, C., Turnbull, B. W., Grohn, Y. T. and Nielsen, S. S. (2007). Nonparametric Estimation of ROC Curves Based on Bayesian Models When the True Disease State Is Unknown. Journal of Agricultural, Biological and Environmental Statistics 12, 128-146.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(score)
score$r <- (score$r >= 3)
ncutoff<- 20
ROC.est<-NPROCwoGS (score, ncutoff, niter=2000, CIlevel=0.95)
#Print results on R screen
ROC.est
#Calculate area under the curve
AUC<- sum((ROC.est$T.Se[1,-1]+ROC.est$T.Se[1,-(ncutoff+2)])*(ROC.est$T.Sp[1,-1]-ROC.est$T.Sp[1,-(ncutoff+2)])/2)
#Find the optimal cutoff to maximize
#Youden Index
opt.cut<- ROC.est$cutoff[which.max(ROC.est$T.Se[1,]+ROC.est$T.Sp[1,])-1]
# Plot ROC curve
plot(1-ROC.est$T.Sp[1,],ROC.est$T.Se[1,],"l", xlab="1-Specificities",ylab="Sensitivities", main=paste("AUC=", format(AUC, digits=4),
        ", Optimal Cutoff=",opt.cut))        
data.frame(1-ROC.est$T.Sp)[c(3,2),]->ci.tsp
data.frame(ROC.est$T.Se)[c(2,3),]->ci.tse
#Write Sensitivities and Specificities to 
#".csv" files, saved in the R library path
#write.csv(ROC.est$T.Se,
#paste(.Library,"/ROCwoGS/data/T_Se.csv",sep=''))
#write.csv(ROC.est$T.Sp,
#paste(.Library,"/ROCwoGS/data/T_Sp.csv",sep=''))

Example output

$cutoff
 [1]   7  11  14  17  18  21  24  27  30  34  38  43  55  66  76  91 113 137 165
[20] 184

$T.Se
      [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
         1 0.9996143 0.9907401 0.9813389 0.9493572 0.9226782 0.8918942
2.5%     1 0.9950852 0.9666735 0.9492244 0.8983488 0.8670585 0.8328973
97.5%    1 1.0000000 0.9999445 0.9982831 0.9845238 0.9660744 0.9453203
           [,8]      [,9]     [,10]     [,11]     [,12]     [,13]     [,14]
      0.8797219 0.8694607 0.8320005 0.8055380 0.7747778 0.7343741 0.7213892
2.5%  0.8141772 0.7963607 0.7538090 0.7176412 0.6847193 0.6388549 0.6234885
97.5% 0.9380316 0.9311867 0.8984368 0.8813630 0.8559230 0.8263141 0.8127752
          [,15]     [,16]     [,17]     [,18]     [,19]     [,20]      [,21]
      0.6633163 0.5797947 0.4898864 0.4053043 0.2987424 0.2085553 0.10127483
2.5%  0.5636181 0.4761595 0.4003544 0.3202765 0.2218970 0.1421521 0.05594418
97.5% 0.7594399 0.6781406 0.5906385 0.5020384 0.3859169 0.2826218 0.15997995
      [,22]
          0
2.5%      0
97.5%     0

$T.Sp
      [,1]         [,2]       [,3]      [,4]      [,5]      [,6]      [,7]
         0 1.599299e-05 0.07594806 0.1590328 0.2515656 0.2824422 0.3798336
2.5%     0 0.000000e+00 0.06756945 0.1476276 0.2377458 0.2679011 0.3659427
97.5%    0 1.852246e-04 0.08569516 0.1706886 0.2651796 0.2964992 0.3958477
           [,8]      [,9]     [,10]     [,11]     [,12]     [,13]     [,14]
      0.4687033 0.5543466 0.6213026 0.7023739 0.7652092 0.8246486 0.9138223
2.5%  0.4536305 0.5393591 0.6052916 0.6882507 0.7525348 0.8128904 0.9041404
97.5% 0.4851716 0.5705185 0.6366237 0.7161535 0.7787042 0.8360954 0.9229107
          [,15]     [,16]     [,17]     [,18]     [,19]     [,20]     [,21]
      0.9529346 0.9694767 0.9849599 0.9949764 0.9973585 0.9987500 0.9990490
2.5%  0.9456822 0.9633300 0.9805107 0.9923265 0.9953046 0.9973280 0.9978255
97.5% 0.9597123 0.9750089 0.9889325 0.9973343 0.9989514 0.9997981 0.9999026
      [,22]
          1
2.5%      1
97.5%     1

$R.Se
               2.5%     97.5% 
0.9570753 0.8296358 0.9999676 

$R.Sp
               2.5%     97.5% 
0.9975563 0.9939206 0.9999658 

$Prev
            [,1]        [,2]       [,3]
      0.06914082 0.012108751 0.02231774
2.5%  0.05277730 0.006965967 0.01433916
97.5% 0.08723912 0.018612094 0.03175238

$flag
[1] 2

ROCwoGS documentation built on May 2, 2019, 7:30 a.m.