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;
proc logistic data=sashelp.class plots=roc;
model sex=age weight height/outroc=roc ;
run;
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.
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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.