pairwise mean comparisons letter display

Frequent Contributor
Posts: 75

pairwise mean comparisons letter display

Dear all,

I was using proc plm in order to get a letter display for pairwise comparisons, using the following code;

proc mixed data=one;

class a b;
model y=
random blk;
lsmeans a b a*b/pdiff;
store sasuser.ccn_y;

proc plm restore=sasuser.ccn_y;
lsmeans a b a*b/pdiff lines;

It works, but the problem is that sometimes (for interactions between factors) I get this message: "The LINES display does not reflect all significant comparisons.  The following additional pairs are significantly different:.......".  Is there another statement other than LINES, or another way to get ALL significantly different pairs with their respective letter?

Thanks a lot!!


Respected Advisor
Posts: 2,655

Re: pairwise mean comparisons letter display

I would willingly wager that the message applies to something like: Level 2 of Factor A/Level 3 of Factor B is significantly different from Level 4 of Factor A/ Level 2 of Factor B.  Is that a meaningful comparison for your experimental design?  If so, then you will need to get the diffs in a dataset and write appropriate code to generate the letters you want.  LINES just won't handle anything that complex.

If you only wish to compare levels of one factor at a fixed value of a second factor (say pairwise comparisons of B levels at each successive level of A), look into the SLICE options.  This might be of particular interest if you have longitudinal data, such as growth curves.

You might also wish to consider some control for multiple comparisons along the way.  Suppose you had 5 levels of A and 4 levels of B.  That's 20 interaction level means, resulting in 190 pairwise comparisons.  Even if there were no effects, in an adequately powered study, random variation is going to lead to about 9 or 10 "significant" comparisons.

Good luck.

Steve Denham

Frequent Contributor
Posts: 75

Re: pairwise mean comparisons letter display

Posted in reply to SteveDenham

Thank you very much for your suggestions Steve!

you are right whenn saying that LINES do not handle complex things, specially for interactions.  I am now using that multimacro from Phiepo, which seems to work good.


Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation