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
- /
- Stat Procs
- /
- Why C statistic is different with and without plot...

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-28-2013 02:41 PM

Hi all,

I'm relatively new to SAS and the community, really appreciate the chance for getting help here. Thanks in advance for any help I may get.

I am running Proc Logistic to build a logistic regression model, and just found that I got two drastically different c statistic value with or without having the option plots=ROC in the Proc Logistic statement. It seems very confusing to me and I have no idea about the reason. A intense Google search didn't find anything.

My code is like this

Proc Logistic data=mydata desc;

weight wgt;

model target=&vars;

ouput out=myout p=p;

run;

The c statistic in the result is 0.552. Percent Concordant is 10.3, and Percent Tied is 89.6. Gamma is 0.996.

Then I turned plots=ROC on, and my code now looks like this.

Proc Logistic data=mydata desc plots=ROC;

weight wgt;

model target=&vars;

ouput out=myout p=p;

run;

The c statistic becomes 0.929, Percent Concordant is 92.4, Percent Tied is 0.9, and Gamma is 0.865. They all are very different from the previous set of values.

Anyone can share your insight into this? Why adding plots=ROC changes the value of results?

thanks,

Richard

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

Posted in reply to richardxy

08-28-2013 02:57 PM

It shouldn't but we can't see what &vars is.

If it truly is different with the exact same data you should post the output from the runs as well, and contact tech support.

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

Posted in reply to Reeza

08-28-2013 03:02 PM

Thanks Reeza for your reply.

&vars is just a string of variables, and it carries the same value for both runs. Will try the tech support.

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

Posted in reply to richardxy

08-28-2013 03:11 PM

It doesn't happen when I run with plots=roc vs without, not using weights.

I noticed you are using Weights, so you may want to consider this note:

**Caution**ROC LOGISTIC does not compute the proper variance estimators if you are analyzing survey data and specifying the sampling weights through the WEIGHT statement. The SURVEYLOGISTIC procedure is designed to perform the necessary, and correct, computations.

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

Posted in reply to Reeza

08-28-2013 03:37 PM

I found another post which asked the same question and had an answer.

I need to specify binwidth=o and roceps=0 for Model statement, if plots=ROC is not used. The result proves that.