Re2124
Re2124

Reputation: 21

Comparison of AUCs if dichotomous variable differs

Can the function roc.test only be used to compare ROC-curves in cases were the dependent (dichotomous) variable is the same for both ROC-Curves (roc1 and roc2) or can it also be used if there are two different dependent variables?

RocI <- roc(dat$I, dat$SIDI.F, ci = TRUE)
RocO <- roc(dat$O, dat$SIDI.F, ci = TRUE)


roc.test(RocI, RocO, method=c("bootstrap"), alternative = c("greater"),
         paired=NULL, reuse.auc=T, boot.n=2000, boot.stratified=TRUE,
         parallel=FALSE, conf.level=0.95)

This is how the data looks like:

   ID I A SIDI.F
1   1 0 0     50
2   2 1 1     13
3   3 1 1     13
4   4 0 0     12
5   5 0 0     13
6   6 0 0     15
7   7 0 0     23
8   8 0 0     34

Upvotes: 1

Views: 74

Answers (1)

Calimo
Calimo

Reputation: 7969

From the roc.test documentation:

This function compares two correlated (or paired) or uncorrelated (unpaired) ROC curves.

So yes, you can use this function if your ROC curves are built from different variables.

Make sure to set paired=FALSE explicitly, just to be sure to use the unpaired tests (although this would likely be detected correctly if you set it to NULL as you did).

Upvotes: 0

Related Questions