我的 ROC 曲线是否与原假设不同?
Is my ROC curve different from null hypothesis?
我用pROC
包画了ROC曲线:
library(pROC)
data(aSAH)
ROCA <- plot.roc(aSAH$outcome, aSAH$s100, percent=TRUE, col="BLUE")
ROCB <- lines.roc(aSAH$outcome, aSAH$ndka, percent=TRUE, col="RED")
legend("bottomright", legend=c("A", "B"), col=c("BLUE", "RED"), lwd=2)
我想检验曲线 A 是否不同于原假设(灰线),但我能找到的唯一检验是比较曲线 A 和 B。
comparecurves <- roc.test(ROCA, ROCB)
text(20, 40, labels=paste("p-value =", format.pval(comparecurves$p.value)))
这是我最后得到的:
我读过这个:ROC curve plot: 0.50 significant and cross-validation 但它对我没有帮助...
感谢您的帮助!
对于ROC曲线下的全面积,the difference to the null hypothesis is equivalent to the Mann-Whitney U statistic. In R you can easily get it with the wilcox.test
函数,例如:
wilcox.test(s100b ~ outcome, data = aSAH)
我用pROC
包画了ROC曲线:
library(pROC)
data(aSAH)
ROCA <- plot.roc(aSAH$outcome, aSAH$s100, percent=TRUE, col="BLUE")
ROCB <- lines.roc(aSAH$outcome, aSAH$ndka, percent=TRUE, col="RED")
legend("bottomright", legend=c("A", "B"), col=c("BLUE", "RED"), lwd=2)
我想检验曲线 A 是否不同于原假设(灰线),但我能找到的唯一检验是比较曲线 A 和 B。
comparecurves <- roc.test(ROCA, ROCB)
text(20, 40, labels=paste("p-value =", format.pval(comparecurves$p.value)))
这是我最后得到的:
我读过这个:ROC curve plot: 0.50 significant and cross-validation 但它对我没有帮助... 感谢您的帮助!
对于ROC曲线下的全面积,the difference to the null hypothesis is equivalent to the Mann-Whitney U statistic. In R you can easily get it with the wilcox.test
函数,例如:
wilcox.test(s100b ~ outcome, data = aSAH)