Hi all,
I am currently conducting logistic regression analysis with a continuous predictor variable. I'm interested in finding a proc solution that can automatically determine optimal cutpoints and dichotomize the continuous variable. I appreciate your help and thank you for your time!
Thank you for sharing the link Ksharp! I will review the posts.
Here is the simple code to get CUTPOINT based on Youden index.
proc logistic data=sashelp.heart(obs=1000);
class bp_status;
model status=bp_status weight height / outroc=roc;
output out=out p=p;
run;
/*%rocplot(v,inpred=out, inroc=roc, p=p, id=_opty_, optcrit=youden)*/
data x;
set roc;
x=_SENSIT_;
y=1-_1MSPEC_;
youden=x+y-1;
run;
proc sql;
select _PROB_ as cutpint label='cutpoint',youden from x having youden=max(youden);
quit;
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.