## LS Means Matrix interpreting - Multiple comparison

Solved
Frequent Contributor
Posts: 105

# LS Means Matrix interpreting - Multiple comparison

Good Evening my SAS friends:

Here i am to get some help about constructing the significance difference ussing LS_MEANS means comparison matrix, weel i have an example to solve (with your help):

Here is the significance LS MEANS matrix :

 i/j 1 2 3 4 5 6 7 8 9 10 11 12 1 1.0000 0.7619 0.2159 1.0000 1.0000 0.6868 0.1134 1.0000 1.0000 0.6291 0.0288 2 1.0000 0.8421 0.1318 1.0000 1.0000 0.7926 0.1631 0.9998 1.0000 0.7434 0.0442 3 0.7619 0.8421 0.0002 0.1632 0.7513 1.0000 0.9999 0.0840 0.5783 1.0000 0.9929 4 0.2159 0.1318 0.0002 0.0630 0.0037 <.0001 <.0001 0.0843 0.0053 <.0001 <.0001 5 1.0000 1.0000 0.1632 0.0630 0.9658 0.0070 <.0001 1.0000 0.9915 0.0017 <.0001 6 1.0000 1.0000 0.7513 0.0037 0.9658 0.4299 0.0058 0.8339 1.0000 0.2921 0.0002 7 0.6868 0.7926 1.0000 <.0001 0.0070 0.4299 0.9337 0.0008 0.1717 1.0000 0.5166 8 0.1134 0.1631 0.9999 <.0001 <.0001 0.0058 0.9337 <.0001 0.0006 0.9121 1.0000 9 1.0000 0.9998 0.0840 0.0843 1.0000 0.8339 0.0008 <.0001 0.9205 0.0001 <.0001 10 1.0000 1.0000 0.5783 0.0053 0.9915 1.0000 0.1717 0.0006 0.9205 0.0828 <.0001 11 0.6291 0.7434 1.0000 <.0001 0.0017 0.2921 1.0000 0.9121 0.0001 0.0828 0.4230 12 0.0288 0.0442 0.9929 <.0001 <.0001 0.0002 0.5166 1.0000 <.0001 <.0001 0.4230

Following this table, arriving to the conclussion i arrives to this result:

1 -> bcde

2 -> bcde

3 -> abcd

4 -> e

5 -> cde

6 -> bcd

7 -> ab

8 -> c

9 -> de

10 -> bcd

11 -> ab

12 -> a

Well my friends, i made this manually...and for this case i would like to know if there is any command line to get this kind of results atumatically. to obtain this type of result:

EXAMPLE

Tukey Grouping                       Mean      N    Treatment

A        192.58      9   1

A

B    A        183.69      9   2

B    A

B    A        161.21      9    3

B    A

B    A        156.47      9    4

B    A

B    A        147.69      9    5

B    A

B    A        142.30      9    6

B    A

B    A        142.30      9    7

B    A

B    A        142.30      9    8

B    A

B    A        142.30      9    9

B    A

B    A        142.30      9    10

B    A

B    A        142.30      9    11

B

B              128.63      9    12

Accepted Solutions
Solution
‎09-25-2015 06:23 AM
Valued Guide
Posts: 684

## Re: LS Means Matrix interpreting - Multiple comparison

Switch from GLM to GLIMMIX (you will need to learn some sytax), and use LINES option on the LSMEANS statement. Works great.

LSMEANS treatment / diff LINES;

All Replies
Solution
‎09-25-2015 06:23 AM
Valued Guide
Posts: 684

## Re: LS Means Matrix interpreting - Multiple comparison

Switch from GLM to GLIMMIX (you will need to learn some sytax), and use LINES option on the LSMEANS statement. Works great.

LSMEANS treatment / diff LINES;

🔒 This topic is solved and locked.

Discussion stats