BookmarkSubscribeRSS Feed

ROC曲線のAUC(Area Under the Curve)について

Started ‎02-19-2019 by
Modified ‎09-10-2018 by
Views 3,604

質問

SAS/STATのLOGISTICプロシジャを利用して、ロジスティック回帰を実行し、ROC曲線を作成しています。ROC曲線のAUCArea Under the Curve)の値をLOGISTICプロシジャで計算することはできますか。

 

回答

LOGISTICプロシジャでロジスティック回帰を実行すると出力される「予測確率と観測データの応答との関連性」(または” Association of Predicted Probabilities and Observed Responses”)のCの値がAUCを示しています。以下に簡単なサンプルを記載いたします。下記のプログラム例では、LOGISTICプロシジャとPLOTSオプションを利用して、ROC曲線を作成しています。

 

サンプルプログラム(Example 74.7 ROC Curve, Customized Odds Ratios, Goodness-of-Fit Statistics, R-Square, and Confidence...😞

data Data1;
   input disease n age;
   datalines;
 0 14 25
 0 20 35
 0 19 45
 7 18 55
 6 12 65
17 17 75
;
proc logistic data=Data1 plots(only)=roc(id=obs);
   model disease/n=age / scale=none
                         clparm=wald
                         clodds=pl
                         rsquare;
run;

実行結果:

予測確率と観測データの応答との関連性
一致の割合 92.6 Somers の D 0.906
不一致の割合 2.0 ガンマ 0.958
タイの割合 5.4 Tau-a 0.384
2100 c

0.953 ←この値

 

※上記の出力で「← この値」で示した「c」の値が、AUCを示しています。 

 

ROCCurve.png

 ※またROC曲線を描いたグラフにも「曲線下面積 = 0.9531」と出力されています。

 

詳細は以下のリンクのSAS/STAT 14.3 User’s Guideをご参照ください。

The LOGISTIC Procedure: PROC LOGISTIC Statement

https://go.documentation.sas.com/?docsetId=statug&docsetTarget=statug_logistic_syntax01.htm&docsetVe...

Version history
Last update:
‎09-10-2018 01:54 AM
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Article Labels
Article Tags

SAS Support Communitiesのユーザーガイドライン


コミュニティの基本的なガイドラインについてご説明します。まずは、こちらをご参照ください。

詳細を読む

 

SAS Support CommunitiesのFAQ


SAS Support CommunitiesのFAQはヘルプに記載されています。参照方法は、こちらからご確認ください。

詳細を読む

 

質問や意見の投稿と返信方法について


Japan SAS Discussionページに質問や意見(メッセージ)を投稿/返信する方法を簡単にご説明します。

詳細を読む