Hi everyone,
New to SAS and looking for some guidance.
I have the following variables: volumes, my outcome and my predictor in a data file.
e.g.
Volume group Volume Outcome Predictor
<500 100 0 1
<500 255 0 0
500-<1000 789 1 1
I've created a ROC curve for my outcome and predictor, but I want to have multiple curves by my volume groups (e.g. <500, 500-<1000, >=1000). Wondering if this is this possible? Here is my code so far.
ods graphics on;
proc logistic data=test plots=effects plots=roc;
model outcome=predictor;
run;
ods graphics off;
you could create a format:
proc format ;
value age 10-14='A' 15-20='B';
run;
proc sort data=SASHELP.CLASS out=CLASS;
by AGE;
run;
ods graphics on;
proc logistic data=CLASS plots=effect plots=roc;
by AGE;
format AGE age.;
model HEIGHT=WEIGHT;
run;
ods graphics off;
As ChrisNZ shows, you can sort the data by your 'Volume group' variable and use a BY statement if you want to create separate ROC curves,
You do not state how you obtained the predicted values, but because your volume appears to be a covariate, you might instead choose to incorporate that information into the model. Then the Predictor variable would use the volume as part of the predictive model.
Lastly, since you already have the Predictor variable and you just want the ROC curve, you should add the NOFIT option to the MODEL statement and use an ROC statement to get the plot:
ROC 'My Curve' pred=Predictor;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.