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

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 561 views
  • 2 likes
  • 2 in conversation