查看原文
其他

R语言玩转诊断性研究

2017-08-26 miffery 临床科研与meta分析


目标数据为乳酸水平对脓毒症患者住院死亡率的预测


单条ROC

> test2 <- rep(c(1, 1), c(47, 55)) ##建立无效假设,因为单条ROC均是和0.5做比较> library(pROC) > library(Epi)> a <- ROC(Lactate, Expired_at_hospital_during_this_admission, plot="ROC") #画ROC > roc(Expired_at_hospital_during_this_admission,Lactate,ci=TRUE)#计算置信区间Call: roc.default(response = Expired_at_hospital_during_this_admission, predictor = Lactate, ci = TRUE) Data: Lactate in 47 controls (Expired_at_hospital_during_this_admission 0) < 55 cases (Expired_at_hospital_during_this_admission 1). Area under the curve: 0.7108 95% CI: 0.6108-0.8108 (DeLong)



两条ROC的比较

> attach(tumo2) > library(pROC) > roc1 <- plot.roc(Expired_at_hospital_during_this_admission, Lactate, col="1") > roc2<-lines.roc(Expired_at_hospital_during_this_admission,Creatinine,col="2") > legend("bottomright", legend=c("lactate", "creatine"), col=c(1,2), lwd=2) > roc.test(roc1, roc2) DeLong's test for two correlated ROC curves data: roc1 and roc2 Z = 1.3196, p-value = 0.187 alternative hypothesis: true difference in AUC is not equal to 0 sample estimates: AUC of roc1 AUC of roc2 0.7108317 0.6150870



您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存