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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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