BookmarkSubscribeRSS Feed
JUMMY
Obsidian | Level 7

I have a data of this nature. 

data have;
  	input diet : $1. @;
			do i=1 to 7;
			input  cholesterol @;
		output;
	end;
drop i;
datalines;
A: 29 32 26 15 34 15 23
B: 11 30 34 13 27 24 21
C: 22 12 20 7 3 27 4
D: 16 21 13 6 0 9 25
E: 6 2 10 -3 8 1 -4
;
run;

I did run the Tukey Test using the code below:

proc glm data=have;
  class diet;
  model cholesterol=diet;
  means diet / lines tukey;
run;

And I got this output:

 

Tukey.png

 

Can someone explain what this output mean? What do the blue and red lines stand for? And which diet is superior compared to the rest?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

@JUMMY wrote:

I have a data of this nature. 

data have;
  	input diet : $1. @;
			do i=1 to 7;
			input  cholesterol @;
		output;
	end;
drop i;
datalines;
A: 29 32 26 15 34 15 23
B: 11 30 34 13 27 24 21
C: 22 12 20 7 3 27 4
D: 16 21 13 6 0 9 25
E: 6 2 10 -3 8 1 -4
;
run;

I did run the Tukey Test using the code below:

proc glm data=have;
  class diet;
  model cholesterol=diet;
  means diet / lines tukey;
run;

And I got this output:

 

Tukey.png

 

Can someone explain what this output mean? What do the blue and red lines stand for?


The blue line crosses C D E, so these are not statistically different. The red line crosses A B C D, so these are not statisitically different. (Or to phrase it opposite, E is different than A and B with 95% confidence, but no other difference is statistically significant.)

 

And which diet is superior compared to the rest?

 

I don't know. What in the data tells you that one diet is better than another diet?

--
Paige Miller
JUMMY
Obsidian | Level 7

@PaigeMiller , what of a case where there are three lines involved? What does the blue, red and green lines means in the diagram below?

 

Duncan.png

PaigeMiller
Diamond | Level 26

These lines are interpreted the same way as two lines.

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1829 views
  • 0 likes
  • 2 in conversation