BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8

Hello,

 

I have values like shown below and each row corresponds to the values of a single hospital.

and I am trying to make a ROC chart using Proc Logistic. Unfortunately I get the statistics table but not the ROC curve

Please help me to figure where the mistake was made.

Thank you

 

 

HAVE

 

expectdMortality   CASE-MIX-INDEX    Hospital

2.91                              2.04                           1

2.57                               2.03                          2

1.60                              1.46                           3

 

 

 

ods graphics on;

proc logistic data=HAVE plots=roc;

model expectdMortality = CASE-MIX-INDEX;

run;

ods graphics off;

3 REPLIES 3
Ksharp
Super User
proc logistic data=sashelp.class plots=roc;
model sex=age weight height/outroc=roc ;
run;
Reeza
Super User

You can't do logistic regression with a continuous dependent variable, it should be binary or ordinal/nominal but definitely not continuous. You can do a linear regression if that's appropriate.

Rick_SAS
SAS Super FREQ

To follow-up Reeza's comment, your code looks like you might have data in events-trials syntax. 

If your data include the variables NUM_DIED and NUM_TREATED then the observed mortality rate for each unit (doctor or hospital) is OBS_MORT_RATE = NUM_DIED / NUM_TREATED.

PROC LOGISTIC supports a syntax that looks very similar: you specify the number or events AND the number of trials on the left side of the MODEL statement, separating those variables by using the '/' symbol. Thus the syntax is

 

proc logistic plots=roc;

model NUM_DIED / NUM_TREATED.= case_mix_index;

run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 1480 views
  • 2 likes
  • 4 in conversation