안녕하세요 교수님
roc 커브에 대해 공부하고 있습니다.
교수님 자료로 아주 좋은 공부가 되었습니다. 언제나 감사드립니다.
다름이 아니라 변수 1개씩 넣어서 2가지 그래프를 비교할 때 DeLong's test for two correlated ROC curves를 이용하셨고
이 값이 plot_ROC (a1, a2) 에 고정되어 그림에 표기 되는 것 같습니다.
단, 3개 이상 비교를 할떄는 이 테스트가 그림에 표기 되지 않는것 같습니다. plot_ROC (a1, a2, a3)
2개를 비교한 그림에서도 DeLong's test for two correlated ROC curves 결과가 표기 되지 않도록 하는 방법은 없을까요?
교수님 자료에서 show.AUC = FALSE or show.AUC=TRUE 와 같은 조절 방법이 가능할까요?
감사합니다.
Comment 2
-
cardiomoon
2018.11.07 11:57
다음과 같이 DeLong's test를 출력하는 부분을 주석처리하면 될 것 같습니다. 감사합니다.plot_ROC=function(x,y=NULL,z=NULL,type=0,col=c("black","red","blue"),lwd=2,show.points=TRUE,show.line=FALSE,show.lr.eta=TRUE,show.sens=TRUE,show.AUC=TRUE){plotROCcount<<-1plot(0:1,0:1,xlim=0:1,ylim=0:1,type="n",ylab="Sensitivity",xlab="1-Specificity")if(type==1) rect(par("usr")[1],par("usr")[3],par("usr")[2],par("usr")[4],border=FALSE,col=gray(0.90))abline(h=seq(0,1,0.1),col=ifelse(type,"white",gray(0.9)))abline(v=seq(0,1,0.1),col=ifelse(type,"white",gray(0.9)))if(!is.null(x)) add_plot_ROC(x,lwd=lwd,col=col[1],show.points=show.points,show.line=show.line,show.lr.eta=show.lr.eta,show.sens=show.sens,show.AUC=show.AUC)segments(0,0,1,1,lty=2)if(!is.null(y)) add_plot_ROC(y,lwd=lwd,col=col[2],show.points=show.points,show.line=show.line,show.lr.eta=show.lr.eta,show.sens=show.sens,show.AUC=show.AUC)if(!is.null(z)) add_plot_ROC(z,lwd=lwd,col=col[3],show.points=show.points,show.line=show.line,show.lr.eta=show.lr.eta,show.sens=show.sens,show.AUC=show.AUC)# if((!is.null(x)) & (!is.null(y)) & is.null(z)) {# if((ncol(x$lr$model)==2)&(ncol(y$lr$model)==2)) {# result=roc.test(ROC2roc(x),ROC2roc(y),plot=T)# if(result$p.value <0.001) {# temp="p < 0.001"# } else temp=paste("p = ",round(result$p.value,3),sep="")## text(0.45,plotROCcount*0.11-0.05,cex=0.8,pos=4,col=col,# paste("DeLong's test for two correlated ROC curves\n",# "Z = ",round(result$statistic,3),", ",temp,sep=""))# }# }} -
PedEndo
2018.11.12 18:40
네 감사합니다.
교수님
덕분에 좋은 것을 배워갑니다!!!
No. | Subject | Author | Date |
---|---|---|---|
1254 | 생존분석 [1] | toby | 2015.04.29 |
1253 | RStudio v0.99 Preview: Code Diagnostics [1] | fermat39 | 2015.04.30 |
1252 | Rstudio 사용법` [3] | 방랑자 | 2015.05.02 |
1251 | need finite 'xlim' values [3] | anthleemd | 2015.05.02 |
1250 | 샤이니 앱에서 SQL 명령어 사용 방법 [2] | 김브링이 | 2015.05.06 |
1249 | 표만들기 관련 [2] | 현승협 | 2015.05.07 |
1248 | MS word문서 저장관련 [1] | 아자 | 2015.05.09 |
1247 | R서버 설치 문의드립니다. [4] | 화모기 | 2015.05.13 |
1246 | 웹에서 하는 R통계 - R코드 [2] | 김영진 | 2015.06.07 |
1245 | Plot inset 만들기 | cardiomoon | 2015.06.09 |
1244 | 오류 질문 - 표작성시 [1] | 미소천사 | 2015.06.15 |
1243 | 오류 질문 - PDF 변환 안되는 file입니다. [1] | 미소천사 | 2015.06.15 |
1242 | print ztable [1] | 김영진 | 2015.06.17 |
1241 | 표 작성시 질문 [1] | simsim | 2015.06.17 |
1240 | 나무 분석 질문입니다. | 미소천사 | 2015.06.19 |
1239 | Interactive ggplot2 [2] | cardiomoon | 2015.06.22 |
1238 | Rstudio server 서버 오류 관련해서 문의드립니다. [2] | 노상래 | 2015.07.22 |
1237 | Rstudio server 무한 로딩 관련해서 문의 드립니다. [6] | 노상래 | 2015.07.24 |
1236 | http://www.r-statistics.com/ 번역소식 [1] | fermat39 | 2015.07.25 |
1235 | 생존분석 변수선택 [3] | nash | 2015.08.11 |