1

I have the following code in SAS, and I need to recreate this model for the same data set in R. I am having trouble finding the proper code to recreate the model, especially changing the distribution of the data to a gamma distribution.

SAS Code

proc glimmix data=combined plot=(residualpanel studentpanel);
class block pen hour daymod;
model mean=hour|pen/solution ddfm=kr dist=gamma;
random _residual_/ subject=steer type=cs;
random block;
random intercept /subject=pen;
lsmeans hour/cl plots=meanplot;
output out=FinalModel pred=p resid=r lcl=lowlimit ucl=uplimit;
run;

Any Help would be Appreciated

Joe
  • 62,789
  • 6
  • 49
  • 67
Dan
  • 143
  • 4
  • 13
  • 1
    try something along the lines of `library("lme4"); glmer(...,family=Gamma)`. (The `...` is left for someone else. You're going to have trouble implementing the compound symmetry (`type="cs"`) option at the moment.) – Ben Bolker Jan 22 '15 at 17:50

0 Answers0