BookmarkSubscribeRSS Feed
wateas
Obsidian | Level 7

I am analyzing data from a factorial experiment using PROC GLIMMIX in SAS.  In the model, "Trt_Amend_App" is a categorical variable that is one of the experimental treatments and "ID_S" is one of two locations. The model results indicate that there is a significant interaction between Trt_Amend_App and ID_S such that Trt_Amend_App is significant at one location, but not the other. I would like to conduct a post-hoc test to determine which levels of Trt_Amend_App are different from each other, corrected for multiple comparisons using the Tukey adjustment, but only for the significant location "Site 2". How might I code that? I've included the code for my model below.  The commented line under the first LSMEANS statement can be thought of a pseudocode indication of what I want to do (it doesn't work 🙂).

 

proc glimmix data=df_y3_t3 plots=studentpanel;
class ID_S Block Trt_Amend_App Trt_CC;
model Response_Var = Trt_Amend_App | Trt_CC | ID_S ID_S(Block);
lsmeans ID_S * Trt_Amend_App / slice=ID_S plot=meanplot(sliceby=Trt_Amend_App join);
/*lsmeans Trt_Amend_App / diff adjust=tukey where(ID_S='Site 2');*/
run;

I understand that the WHERE statement can be used to achieve the desired test in a separate procedure, but I'm hoping for a more streamlined solution.  Thanks for reading.

3 REPLIES 3
Ksharp
Super User
You might could try SLICE statement:
slice ID_S * Trt_Amend_App / sliceby(ID_S='Site 2') diff;

https://support.sas.com/kb/24/447.html
wateas
Obsidian | Level 7

Thanks for the suggestion, but I don't see any additional output when I add the statement.

Ksharp
Super User
Maybe I don't understand what you are looking for very well.
Post your question at Statistical Forum:
https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures

@StatDave @SteveDenham might give you a hand.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 820 views
  • 1 like
  • 2 in conversation