Hello!
I'm having some trouble with the glimmix procedure.
Basically, here is what I want to do: I want to take the following code that utilizes the mixed procedure, and write equivalent code that uses the glimmix procedure. From what I understand, I can get both the mixed and glimmix procedures to produce (roughly) the same results.
My data is non-normal, which is why I need glimmix. But I want a starting point to work off of. I know the mixed procedure will run properly, so I want to make sure my glimmix code runs properly as well.
Here is my code for the mixed procedure
proc mixed data=sasuser.w_400_2012 method=reml;
class ID track_type;
model l_time = fixed_date track_type / s residual outp=work.resid;
random int fixed_date / subject=ID;
repeated / subject=ID type=SP(POW)(fixed_date);
lsmeans track_type / diff;
run;
quit;
If anyone can help me, that would be AWESOME.
And if you need more info, just let me know
Since GLIMMIX does not support the REPEATED statement as such, instead using _residual_ in a random statement, you might try:
proc mixed data=sasuser.w_400_2012 method=reml;
class ID track_type;
model l_time = fixed_date track_type / s residual outp=work.resid;
random int fixed_date / subject=ID;
random _residual_ / subject=ID type=SP(POW)(fixed_date);
lsmeans track_type / diff;
run;
Now when you shift over to a non-Gaussian distribution, take care, as most of the distributions are such that the means and variances are not independent, and perhaps should be modeled as G-side "repeated" rather than R-side "repeated". See Walt Stroup's Generalized Linear Mixed Models (2013) for an interesting take on this. A great book, with tons of GLIMMIX examples.
Steve Denham
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.