- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I like to use Tukey Groupings in Proc GLM and GLIMMIX but is it possible to get Tukey groupings in Proc Mixed? Here is some example code. Thank you!!
proc mixed;
class trt ID;
model logng=trt;
lsmeans trt/adjust=tukey;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The documentation for the LSMEANS statement in PROC MIXED indicates that it supports the ADJUST=tukey. So I'd say "yes," provided that you remember it is for fixed effects only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply! Do you know how to write code in Mixed that tells SAS to do the Tukey groupings? In the code I provided, I get the Tukey-adjusted P-values but have to figure out the groupings (e.g., A, B, C; LS-means with the same letter are not significantly different) on my own. It is not hard to do, but I want SAS do it for me! I know how to do it in GLM and GLIMMIX (the lines option) just not in Mixed (the lines option does not work). Thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If I understand your question, I think you are asking for graphical techniques to determine significant differences between groups. The old LINES option is not the best at that task. In fact, in Westfall et al, Multiple Comparisons and Multiple Tests, the authors show an example (p. 69-70) in which the LINES output is misleading and write "our purpose in showing this analysis is to discourage [their emphasis] you from using it" with unequal sample sizes because it "can lead to incorrect inferences."
Due to the influential book by Hsu (1996), other graphical approaches have been implemented in SAS. A favoriate of many is the "diffogram," which you can request on the LSMEANS statement by using the PLOTS=DIFFOGRAM option.
For more about graphical comparisons of LSMEANS, see the excellent papers by Robin High:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Awesome! Thank you so much. I tried adding it to the LSMEANS statement (as below) but it would not run. Can you make any suggestions to this code? Thank you!!
proc mixed;
class trt ID;
model logng=trt;
lsmeans trt/adjust=tukey plots=diffogram;
run;