BookmarkSubscribeRSS Feed
halladje
Fluorite | Level 6

Hi There, 

 

Most times when I try to run a random intercept 3 level (students within classrooms within schools) multinomial logistic model, I run into issues of memory or convergence issues and it takes about 4 hours to run one model (that usually doesn't work). 

 

I was wondering if anyone had thoughts on my code and suggestions to improve convergence, memory, and speed. 

 

Thanks so much!

 

proc glimmix data=sel noclprint method=rspl noclprint;
class x_idschool x_class_id ov2 (ref=first) s_female (ref=first) sch_lvl_sec (Ref=first) t_selprog (Ref=first);
model ov2 = s_female b_age_gm b_pared_gm b_int_gm b_ext_gm
sch_lvl_Sec enrol_gm median_gm
bs_Sel_gm bs_sel_schl_gm t_selprog
/link=glogit dist=multinomial solution oddsratio cl;
random intercept/subject = x_idschool type=un group=ov2;
random intercept/subject=x_class_ID(x_idschool) type=un group=ov2;
nloptions technique=congra maxiter=1000 gconv=1e-4;
covtest/wald;
run;
quit;

3 REPLIES 3
pau13rown
Lapis Lazuli | Level 10

this is a good question. I read a sas blog that suggested using "options nonotes;" to suppress notes in the log, but then you cannot evaluate convergence easily. edit: maybe it also helps to use proc printto to send the output and log to a file, rather than it filling up the log window etc

 

i too am interested in what users think about solving the memory issue

StatDave
SAS Super FREQ

Unless you particularly want a subject-specific model, a population-averaged model can be obtained using the Generalized Estimating Equations method with PROC GEE and the REPEATED statement. But there is no guarantee that a GEE model will take less time or avoid fitting problems since binomial and multinomial models are often compromised by sparseness of the data as the model becomes more complex. For either model, you would do well to start with as simple a model (fewest number of parameters to estimate) as possible. If such a model fits without trouble, then add complexity as tolerated by the fitting process.

pau13rown
Lapis Lazuli | Level 10

for what it's worth, i stumbled upon a couple of sources of info:

 

-"sas performance tuning techniques" https://www.phuse.eu/blog/sas%c2%ae-performance-tuning-techniques [need to be a phuse member to access, most recommendations are common sense]

 

-guy on this message board asks a similar Q, and ultimately the recommendation is to buy more RAM because it's cheap: https://www.developpez.net/forums/d1490127/logiciels/solutions-d-entreprise/business-intelligence/sa...

 

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