Hello,
I am a relatively novice SAS user (currently using SAS 9.4, remote) and have what I believe is a very basic question. I have a data set (n=80) of patients with one of three cancers (prostate, lung, breast) and am comparing other serum measurements against their form of cancer. For example: Is the mean serum, albumin level different between patients with lung cancer and breast cancer, etc. For this I am utilizing a one-way ANOVA with post hoc Tukey test to control for type one error. Everything runs smoothly and I get the results I want but I would like to report the exact p-values between the multiple comparisons rather than just knowing they are significant (a<0.05) via asterisks. Is there a way to do this? Adding a lines statement before tukey does not give the p-value either.
Sample code (after data):
proc anova data=TotalINTSAS;
class cancer;
model albumin=cancer;
means cancer/tukey;
run;
Any help is appreciated! Thanks.
-Alle
Shift over to PROC GLM so that you can use the LSMEANS statement (probably a good idea anyway as I would guess that your data are unbalanced per cancer type).
proc glm data=TotalINTSAS;
class cancer;
model albumin=cancer;
lsmeans cancer/stderr pdiff=all adjust=tukey;
run;
Steve Denham
Shift over to PROC GLM so that you can use the LSMEANS statement (probably a good idea anyway as I would guess that your data are unbalanced per cancer type).
proc glm data=TotalINTSAS;
class cancer;
model albumin=cancer;
lsmeans cancer/stderr pdiff=all adjust=tukey;
run;
Steve Denham
Steve-
I appreciate your quick and helpful reply! I ran the code you posted and it works quite well. My data is almost balanced (prostate=25, breast=30, lung=25) but in the future I am sure it will not be so pretty thus this is a great trick to keep in my pocket! Thanks again.
-Alle
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.