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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.