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*/
output;
end; end; end; end; end; end; end;
run;
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));
run; 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 !
... View more