Programming the statistical procedures from SAS

Convergence of GLIMMIX vs. GENMOD

Regular Contributor
Posts: 180

Convergence of GLIMMIX vs. GENMOD

Hello all,


I am tring to figure out an issue which bothers me for quite some time, maybe you can help me understanding it. I wrote a SAS program to simulate the power (power analysis) for an experiment, where I have two groups (Treatment and Control), for treating some eye condition. Each subject will contribute both eyes, and therefore the observations are NOT independent, and the outcome is binary: 1 = success, 0 = failure.

Under the prior assumptions regarding the probability of success in both groups, and regarding the correlation within a subject, I used some theory of probability to calculate the probability for each of the following events (for each group):

  • Right eye succee and left eye success
  • Right eye succee and left eye failure
  • Right eye failureand left eye success
  • Right eye failureand left eye failure

Using these probabilities, I have simulated data (using the RAND TABLE function). I did this 1000 times, and for each dataset, I ran a model to obtain a P-value, and then the power (for a given sample size) was the number of significant P-values out of 1000.


And now for my question. I tried to model using both GLIMMIX and GENMOD. While GLIMMIX performed reasonably (only a few single models did not converge), using GENMOD a relatively large number of modle did not converge (still the majority did). What I wanted to know, is why this has happened.


part of my code are below:



%let pt = 0.7, 0.75, 0.8;
%let pc = 0.2, 0.3, 0.4;
%let corr = 0.2, 0.3, 0.4;
%let n = 20, 25;
%let NumSamples = 1000;

data Sim;*(keep=SampleID i c x);
call streaminit(4321);
Do pt=&pt;
Do pc=&pc;
Do corr=&corr;
Do N=&n;
/*calculating probabilities*/
/*Simulate the data using RAND*/
end; end; end; end; end; end; end;

proc glimmix data = Simulateddata ;* method=quad;
by pt pc corr N SampleID;
class ID Group Eye;
model outcome(event='1') = Group / dist=binary solution;
random Eye/residual type=unr subject=ID ; * r side was used so I can see that I actually got the correlation I wanted;
lsmeans Group/ilink;
ods output ParameterEstimates = GLMMs(where=(Group=2)); 

So this worked more or less fine, while GEE did not converge in more than 100 cases out of 1000. Any idea why ? I have the book of Stroup on GLMM's, if the answer is there, can you please refer me to the point where it is explained ?


Thank you very much !

Valued Guide
Valued Guide
Posts: 673

Re: Convergence of GLIMMIX vs. GENMOD

I can't tell if you are fitting the right model since you don't give the full simulation code. Don't know what group and ID are, based on your code. I assume the right model. You should note that when you use a 'residual' for binary or binomial data, you are getting quasi-likelihoods, not true likelihoods. It is difficult to interpret an R-side var-covar matrix with binary data, other than it is giving you desired inflation of the SEs of the fixed effect parameters (and adjustments for test statistics). But this is just background. GENMOD and GLIMMIX use different estimation methods, even for working correlation matrix models, such as the one you are using. The actual algorithm is different. So, one may converge more readily than the other for certain types of data sets and models.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation