BookmarkSubscribeRSS Feed
Gypsium
Calcite | Level 5

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!

4 REPLIES 4
Gypsium
Calcite | Level 5

Thank you for sharing the link Ksharp!  I will review the posts.

Ksharp
Super User

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;

Ksharp_0-1706079957162.pngKsharp_1-1706079985197.png

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 869 views
  • 2 likes
  • 2 in conversation