I have been using GLIMMIX to get the random effects estimates for second level units (counties). The data has over 40,000 level-1 records nested within 8 level-2 units (counties). The dependent variable is binary event indicator "event_pm" (1=event, 0=no event). There are no covariates except for county level random effect. The GLIMMIX program is shown below as well as the event frequencies for each level 2 county.
However, to my surprise, the model did not converge. Is it because 8 level-2 units is too few for the GLIMMIX model? Or is it because the number of events (event=1) for some counties are too few? One county has only over 30 events. What options can I use to overcome the non-convergence problem?
Any suggestions are appreciated.
PROC GLIMMIX data = ppage4 /*method=RSPL*/ noclprint pconv=1e-4;
class county;
model event_pm (event="1") =
/dist=binary solution;
random intercept /subject=county solution cl;
run;
Cumulative | |
county event_pmFrequency | Frequency |
------------------------------------------------
1 | 0 | 6445 | 6445 | |
1 | 1 | 212 | 6657 | |
3 | 0 | 12436 | 19093 | |
3 | 1 | 376 | 19469 | |
5 | 0 | 1677 | 21146 | |
5 | 1 | 59 | 21205 | |
7 | 0 | 1216 | 22421 | |
7 | 1 | 36 | 22457 | |
9 | 0 | 12055 | 34512 | |
9 | 1 | 377 | 34889 | |
11 | 0 | 3855 | 38744 | |
11 | 1 | 116 | 38860 | |
13 | 0 | 1240 | 40100 | |
13 | 1 | 32 | 40132 | |
15 | 0 | 1673 | 41805 | |
15 | 1 | 50 | 41855 |
There can be many reasons for nonconvergence, and it would be not for the reason you are worried about. It is not clear if it is getting close to convergence (just needing more steps) or is stuck far from the solution locus. It could be stuck on the inner or outer iteration of the doubly iterative RSPL method. I suggest you increase the maximum number of iterations and try different optimization techniques. Add
nloptions maxiter=1000 maxfunc=1000 technique=NRRIDG;
Or try TRUREG or CONGRA for technique.
For binary data, you could also change your estimation to method=LAPLACE on the procedure statement. But this might be v-e-r-y slow with the number of levels you have.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.