BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jonatan_velarde
Lapis Lazuli | Level 10

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

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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;

 

View solution in original post

1 REPLY 1
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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;

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1756 views
  • 2 likes
  • 2 in conversation