Programming the statistical procedures from SAS

Why C statistic is different with and without plots=ROC in Proc Logistic

Reply
New Contributor
Posts: 3

Why C statistic is different with and without plots=ROC in Proc Logistic

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

Super User
Posts: 18,491

Re: Why C statistic is different with and without plots=ROC in Proc Logistic

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.

New Contributor
Posts: 3

Re: Why C statistic is different with and without plots=ROC in Proc Logistic

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.

Super User
Posts: 18,491

Re: Why C statistic is different with and without plots=ROC in Proc Logistic

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:

CautionSmiley TongueROC 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.

New Contributor
Posts: 3

Re: Why C statistic is different with and without plots=ROC in Proc Logistic

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.

Ask a Question
Discussion stats
  • 4 replies
  • 1425 views
  • 0 likes
  • 2 in conversation