BookmarkSubscribeRSS Feed
danirecchia
Calcite | Level 5

Hello, I am having some difficulties to use the proc logistic with my grouped variables. I first created new formats for my continuos variables and now I want them on the modell, I mean for example:

proc format;

value AVG_DELAY_L24Mgroup  low-0.5 = 'delay1'

                                               0.5-high = 'delay2';              

run;

for the frequency tables I have to specify, that I want the new format and so I did:

PROC FREQ data=score2;

  TABLES  AVG_DELAY_L24M*bad_client;

  format AVG_DELAY_L24M AVG_DELAY_L24Mgroup.;

RUN;

ok, untill here. But what should I do for the modell, I tried:

proc logistic data = score2 descending;

format AVG_DELAY_L24M AVG_DELAY_L24Mgroup. Credit_limit Credit_limitgroup. DUR_CUST_REL DUR_CUST_RELgroup.;

class BRANCH_LEVEL_AGG Regis_date;

model bad_client = AVG_DELAY_L24M BRANCH_LEVEL_AGG Credit_limit DUR_CUST_REL;

run;

but the programm doesn't understand that I want the grouped variables and keep modelling with the original ones. How should I say to SAS what I want?

Thanks

3 REPLIES 3
Reeza
Super User

Try adding the variable(s) into your class statement

class BRANCH_LEVEL_AGG Regis_date avg_delay_l24m;

danirecchia
Calcite | Level 5

Thank you Reeza, I solved writing the new variable format on the dataset:

data test;

set scoring;

retain AVG_DELAY_L24M_cat;

AVG_DELAY_L24M_cat = put(AVG_DELAY_L24M,AVG_DELAY_L24Mgroup.);

run;

Reeza
Super User

You should still add the new variable into your class statement.

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
  • 3 replies
  • 1567 views
  • 0 likes
  • 2 in conversation