turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Data Mining
- /
- AUC value (Area Under Curve or ROC Index) in SAS M...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-12-2016 01:11 PM

Good afternoon,

I am looking for the AUC value (Area Under the Curve or ROC Index) in SAS Enterprise Miner in SAS 9.3. I have explored all the options from the ROC curve graph (see pic) and from the nodes I am using (logistic regression, decision trees and neural nets) without any success.

Many thanks in advance.

Accepted Solutions

Solution

07-06-2017
01:31 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-13-2016 04:20 PM

You need to attach a Model Comparison node to the modeling node(s) that you are running, then in the Results for Model Comparison, if you look in the Statistics Comparison table, the row where Fit Statistics="_AUR_" corresponds to the area under the ROC curve. The KS statistic is reported in that table as well.

Hope that helps!

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-12-2016 03:38 PM

I'm don't use Enterprise Miner but I've calculated AUC using PROC LOGISTIC. It looks like EM is generating SAS code in the background perhaps (similar to DI studio?). If so, is there somwhere you can see PROC LOGISTIC code which you would be able to edit by hand? Can you show the current PROC LOGISTIC code?

You would want to insert a ROC statement within the PROC LOGISTIC step.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-13-2016 02:13 PM

Hi. You could compute AUC from the dataset that EM uses to display the ROC chart in the Model Comparison node.

Here's some basic code that uses the formula for the area of a trapezoid. Put it in a SAS Code node after your Model Comparison node and run it. (disclaimer: untested code.)

The code assumes you have a single model (i.e., just one modeling node is hooked up to the Model Compare node) and that the nodeID of your model comparison is 'MdlComp'.

data roc;

retain AUC ;

set &em_lib..mdlcomp_emroc (where=(model ne " _Baseline_"));

avgHeight = (sensitivity + lag1(sensitivity)) / 2;

width = oneminusspecificity - lag1(oneminusspecificity);

smallArea = avgHeight * width;

AUC + smallArea;

run;

*last row contains (total) AUC;

proc print data = roc;

var sensitivity avgHeight width oneMinusSpecificity smallArea AUC;

run;

Hope this helps.

Ray

Solution

07-06-2017
01:31 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-13-2016 04:20 PM

You need to attach a Model Comparison node to the modeling node(s) that you are running, then in the Results for Model Comparison, if you look in the Statistics Comparison table, the row where Fit Statistics="_AUR_" corresponds to the area under the ROC curve. The KS statistic is reported in that table as well.

Hope that helps!