BookmarkSubscribeRSS Feed
samsun
Calcite | Level 5

I use SAS 9.4 to do anova analysis, and fallow the instruction, the result only shows anova but didn't show tukey. Are there any problem with software.

13 REPLIES 13
Ksharp
Super User

Did you means this ?

 

proc glm data=sashelp.heart;
class bp_status;
model weight=bp_status/solution;
lsmeans bp_status/diff adjust=tukey lines;
quit;

Ksharp_0-1733129381524.png

 

PaigeMiller
Diamond | Level 26

Likely there are problems with your code. Don't keep us in the dark, show us your code!

--
Paige Miller
samsun
Calcite | Level 5

samsun_1-1733142248544.png

here is the results
only anova but no tukey.
I don't know if the problem is software(9.4) or program.
thank you so much

 

samsun_0-1733142206013.png

 

PaigeMiller
Diamond | Level 26

From now on, please provide code as text, in the code box (little running man icon), and not as screen captures.

 

This code works properly for me, I see the Tukey information underneath the output where you see 

 

PaigeMiller_0-1733144417307.png

 

This is what I see

PaigeMiller_1-1733144441306.png

 

 

--
Paige Miller
samsun
Calcite | Level 5

itle1 'Nitrogen Content of Red Clover Plants';
data Clover;
input Strain $ Nitrogen @@;
datalines;
3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0
3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3
3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8
3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;

proc anova data=Clover;
class Strain;
model Nitrogen = Strain;
means Strain / tukey;
run;

PaigeMiller
Diamond | Level 26

Please read carefully, I said the code should be in a code box, that's the window that appears when you click on the "little running man" icon.

 

I don't know why the Tukey analyses appears for me and doesn't appear for you.

 

Does the Tukey analysis appear as a graph, like this:

 

PaigeMiller_0-1733146767218.png

 

--
Paige Miller
samsun
Calcite | Level 5

the results were shown as before, there is not the same with yours, that is why I ask for someone help here.

PaigeMiller
Diamond | Level 26

So I can't explain why I get the Tukey and you don't, using the exact same code. If no one else here can figure it out, I suggest you contact SAS Tech Support at 1-800-727-0025 (in the USA). If you are outside the USA, you will have to look on the SAS web site to find the proper phone number.

--
Paige Miller
samsun
Calcite | Level 5
Hi PaigeMiller,
Thank you for your answer.
samsun
Calcite | Level 5

title1 'Nitrogen Content of Red Clover Plants';
data Clover;
input Strain $ Nitrogen @@;
datalines;
3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0
3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3
3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8
3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;

proc anova data=Clover;
class Strain;
model Nitrogen = Strain;
means Strain / tukey;
run;

 

the result shows on my computer were no tukey.

Ksharp
Super User

1)

Which version of sas are you using ?

Try to run the following code to check it.

%put &sysvlong.;

2)

Try to run the following code :

ods graphics;
proc anova data=Clover;
class Strain;
model Nitrogen = Strain;
means Strain / tukey;
quit;
samsun
Calcite | Level 5

the SAS vision is 9.4

the following example is from SAS instruction.

the results shown in my computer were only anova but no tukey.

That' why I am looking for someone's help.

 

title1 'Nitrogen Content of Red Clover Plants';
data Clover;
input Strain $ Nitrogen @@;
datalines;
3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0
3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3
3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8
3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;

proc anova data=Clover;
class Strain;
model Nitrogen = Strain;
means Strain / tukey;
run;

samsun
Calcite | Level 5

Someone have shown me the result was no problem.

but I did not see the same result on my computer.

I'll try you code later.

Thank you.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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
  • 13 replies
  • 2085 views
  • 0 likes
  • 3 in conversation