1

I made two ROC curves and one of the results is as follows:

> roc1 <- roc(cData$`<60`$resule, cData$`<60`$SOFA1)
Setting levels: control = survival, case = death
Setting direction: controls <cases
> roc1

Call:
roc.default(response = cData$`<60`$resule, predictor = cData$`<60`$SOFA1)

Data: cData$`<60`$SOFA1 in 26 controls (cData$`<60`$resule survival) <18 cases (cData$`<60`$resule death).
Area under the curve: 0.7692

Another result is as follows:

    > roc2 <- roc(cData$`<60`$resule, cData$`<60`$SOFA7)
    Setting levels: control = survival, case = death
    Setting direction: controls <cases
    > roc2



Call:
roc.default(response = cData$`<60`$resule, predictor = cData$`<60`$SOFA7)

Data: cData$`<60`$SOFA7 in 26 controls (cData$`<60`$resule survival) <2 cases (cData$`<60`$resule death).
Area under the curve: 0.9327

The result obtained after comparing through the roc.test() of the pROC package is:

> roc.test(roc1,roc2)

DeLong's test for two correlated ROC curves

data: roc1 and roc2
Z = 0.54339, p-value = 0.5869
alternative hypothesis: true difference in AUC is not equal to 0
sample estimates:
AUC of roc1 AUC of roc2
  0.9615385 0.9326923

The AUC of roc1 was 0.7692 and the AUC of roc2 was 0.9327, but why after comparing with roc.test(), the AUC becomes 0.9615385 0.9326923 respectively?

Calimo
  • 7,510
  • 4
  • 39
  • 61
dbcoffee
  • 173
  • 1
  • 8
  • Please add an minimal reproducible example. See https://stackoverflow.com/help/mcve and https://stackoverflow.com/q/5963269/333599 on how to do that. – Calimo Aug 30 '21 at 08:51
  • I think I found the reason for the inconsistent results. The reason is that my data has missing values. The number of missing values in different indicators is different. In `roc.test()`, all indicators will be merged and the missing values will be deleted, which leads to the final results are inconsistent. I did it again in MedCalc, and got the same result in R. Thank you Calimo. – dbcoffee Aug 30 '21 at 13:18

0 Answers0