Programming the statistical procedures from SAS

proc logistic with grouped variables

Reply
Occasional Contributor
Posts: 16

proc logistic with grouped variables

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

Grand Advisor
Posts: 16,880

Re: proc logistic with grouped variables

Try adding the variable(s) into your class statement

class BRANCH_LEVEL_AGG Regis_date avg_delay_l24m;

Occasional Contributor
Posts: 16

Re: proc logistic with grouped variables

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;

Grand Advisor
Posts: 16,880

Re: proc logistic with grouped variables

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

Ask a Question
Discussion stats
  • 3 replies
  • 175 views
  • 0 likes
  • 2 in conversation