BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
abarnard
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

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

abarnard
Calcite | Level 5

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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