BookmarkSubscribeRSS Feed
nicophoenix
Calcite | Level 5

Hi there and good mrning from the Netherlands,

 

I am a novice user of the SAS University Edition and I have performed a logistic regression analysis with 176 cases, 1 dichotome dependent variable, of course, 5 categorical independent variables and 10 continuous independent variables. The results were, as expected, unreliable because of unusual high standard errors. So I decided to do a exact logistic procedure with the following code. However, after 2 1/2 hrs ths system had not yet replied with results. I could have waited for the default seven days but that would not be very practical.

My question is: which inefficiencies can be discovered in the code ?

Thank you very much for your suggestions.

regards,

Nico Verhoef,

student

Open University.

 

ods noproctitle;
ods graphics / imagemap=on;

proc logistic data=WORK.IMPORT;
class GENDER AGE PRACTYPE WORKHRS PRACYRS / param=glm;
model EXC_PRES(event='1')=GENDER AGE PRACTYPE WORKHRS PRACYRS WAItot WAI1 WAI2
WAI3 WAI4 WAI5 WAI6 WAI7 EE DP / link=logit technique=fisher;
exact GENDER AGE PRACTYPE WORKHRS PRACYRS WAItot WAI1 WAI2
WAI3 WAI4 WAI5 WAI6 WAI7 EE DP;
exactoptions method=networkmc;
run;

 

 

2 REPLIES 2
Ksharp
Super User

You are using EXACT Logistic ,which is very expansive to build a model.

 

exact GENDER AGE PRACTYPE WORKHRS PRACYRS WAItot WAI1 WAI2 
WAI3 WAI4 WAI5 WAI6 WAI7 EE DP;
exactoptions method=networkmc;

 Try another option .

model y=x1 ........ /  FIRTH ;

Reeza
Super User

You have too many variables for the number of observations in your data. 

You typically need 25 observations per variable as a general rule of thumb, which means you'd need at minimum 10*25 + 5*25 = 375 observations, assuming your categorical variables are binary. If they have more levels, then you need 25 observations for each level. So your estimates from this model will not be reliable. 

Other options are to ensure you set your VM to two cores (the max you can specify) and as much RAM as possible from your system. I think the default is 1GB which would be slow. 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 617 views
  • 1 like
  • 3 in conversation