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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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