Hi.
I am trying to run a tukey test after the annova
with this code:
data new; set mpa;
proc glm;
class fabric laundry time temperature;
model deltae=fabric|laundry|time|temperature;
means fabric*laundry*time*temperature; means fabric*laundry*time*temperature;
proc glm;
class fabric laundry time temperature;
model deltae=fabric|laundry|time|temperature;
means fabric*laundry*time*temperature/tukey lines;
run;
I think i am mistaking the second part..
Can anyone please give me a light on that?
thanks
Hi @palominm!
One issue that I see with your PROC GLM is that you have the pipes | in your model statement. Those should not be necessary. In all of the examples I see they just list their dependent variables with spaces in between the variables.
That could be an issue, however it may not be the only one. Did you received an error in the log when you ran this code?
I may be missing something but the use of the bar (pipe) operator should not make a difference since it is equivalent to listing the factors separately.
Instead, I believe the issue is that the tukey option can only be used with main effects. As per the PROC GLM documentation for the MEANS statement, "multiple comparisons tests apply only to main effects," and for the TUKEY option it states that it "performs Tukey’s studentized range test (HSD) on all main-effect means in the MEANS statement."
So the code
means A B / tukey;
means A*B;
produces the same results as
means A B A*B / tukey;
since the interaction effect will be ignored by Tukey's test.
Ah, I see that now. I never seen anyone use the pipes for this but you are correct!
Yes, they are very convenient for factorial models! 🙂
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.