BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rachard11
Fluorite | Level 6

How do I output the c-statistic with proc logistic when the strata statement is used? Without the strata statement, this statistic is output automatically. Google searches indicate many of the options for outputting data related to the c-statistic in proc logistic do not apply when the strata statement is used, and I'm looking for a workaround. I'm using SAS 9.4.

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

In a fixed effects model you are maximizing a conditional log likelihood which allows you to avoid estimating all of the individual strata parameters. Those strata parameters would be in the unconditional model resulting from putting the strata variable in the model instead of the STRATA statement. Without these parameters, the usual unconditional predicted probabilities for each observation are not possible, and these are necessary to compute the statistics that make up the ROC curve and its area.

 

And from Rick:

The AUC (c) statistic is contained in the "Association" table, but as stated in the documentation, the "Association" table is not created when you use the STRATA statement. (Similarly, the ROC statement and the OUTROC= option are not allowed when a STRATA statement is specified.) So what you are asking for doesn't make sense.

 

If you are trying to compare/contrast the ROC curves for various models, you can use the ROC and ROCCONTRAST statements.

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

The AUC (c) statistic is contained in the "Association" table, but as stated in the documentation, the "Association" table is not created when you use the STRATA statement. (Similarly, the ROC statement and the OUTROC= option are not allowed when a STRATA statement is specified.) So what you are asking for doesn't make sense.

 

If you are trying to compare/contrast the ROC curves for various models, you can use the ROC and ROCCONTRAST statements.

rachard11
Fluorite | Level 6
Thank you for the response, Rick. I'm using the strata statement to run
firm fixed effects in a logistic regression with panel data (each firm is a
separate stratum). Conceptually, is there a reason that computing a
c-statistic wouldn't make sense when using the strata statement? Or is it
just that SAS doesn't output the association table or other output that
contains the c-statistic? Sorry if I'm missing something obvious here.
StatDave
SAS Super FREQ

In a fixed effects model you are maximizing a conditional log likelihood which allows you to avoid estimating all of the individual strata parameters. Those strata parameters would be in the unconditional model resulting from putting the strata variable in the model instead of the STRATA statement. Without these parameters, the usual unconditional predicted probabilities for each observation are not possible, and these are necessary to compute the statistics that make up the ROC curve and its area.

 

And from Rick:

The AUC (c) statistic is contained in the "Association" table, but as stated in the documentation, the "Association" table is not created when you use the STRATA statement. (Similarly, the ROC statement and the OUTROC= option are not allowed when a STRATA statement is specified.) So what you are asking for doesn't make sense.

 

If you are trying to compare/contrast the ROC curves for various models, you can use the ROC and ROCCONTRAST statements.

rachard11
Fluorite | Level 6

That makes sense. Thank you for the explanation.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 13256 views
  • 0 likes
  • 3 in conversation