BookmarkSubscribeRSS Feed
xipazpor
Calcite | Level 5

I am using PROC MIXED to examine differeces across 5 different treatments. I would like to know how to enable my 'LSMEANS variable = treatment / ADJUST=TUKEY;' statement to display differences using letters in the output. Any advice is appreciated.

 

I am using the following code:

%MACRO MIXED1 (DATASET, DEPVAR, ID);
PROC MIXED DATA = &DATASET;
CLASS TRT BLOCK PEN SEX;
MODEL &DEPVAR = TRT/RESIDUAL OUTP=STUDENTRESIDUAL;
RANDOM BLOCK;
LSMEANS TRT/PDIFF=all;
STORE STOREDATA;
RUN;
 
PROC PLM RESTORE=STOREDATA;
LSMEANS TRT/PDIFF=ALL PLOT=MEANPLOT CL LINES;
RUN;
 
PROC PRINT DATA = STUDENTRESIDUAL;
WHERE ABS(STUDENTRESID) GT 3.5;
RUN;
 
PROC UNIVARIATE DATA=STUDENTRESIDUAL NORMAL PLOT;
VAR STUDENTRESID;
RUN;
 
PROC KDE DATA=STUDENTRESIDUAL;
UNIVAR STUDENTRESID;
RUN;
 
QUIT;
%MEND;

%MIXED1 (MasterFile, pigWt1, 1);

 

1 REPLY 1
PaigeMiller
Diamond | Level 26

I'm not sure what you mean by "using letters".

 

If you mean something like the LINES option in the LSMEANS statement in PROC GLM, as far as I know that is not available in PROC MIXED.

 

If you mean something else, please explain in a lot more detail.

--
Paige Miller

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 1 reply
  • 1754 views
  • 0 likes
  • 2 in conversation