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 2025: Call for Content

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!

Submit your idea!

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