Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lizzy28
Quartz | Level 8

Hi Everyone,

 

I'm trying to do two-way ANOVA check with Dunnett option but need to have p-value for the mean comparison. I use the code below:

 

proc anova data=dataset;

class A B;

model COST = A | B;

 means A | B /dunnett; 

run;

 

The last piece of the test has the following table:

anova.PNG

 

I need to have P-values to see if means are significantly different across the groups. Anyone knows how to do it?

 

Thanks a lot!

Lizi

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Adding

 

If you want to do Dunnett's test on interactions, you can do this with Least-Squares Means (which you should probably be using anyway with this unbalanced data). 

 

http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=statug&docsetTarget=statug_glm...

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I don't think you can perform a Dunnett's test on an interaction in SAS. I believe it only applies to main effects.

 

I think you should not use PROC ANOVA here, you really ought to use PROC GLM to analyze this data (although you still can't do Dunnett's test on interactions in either PROC), but GLM will probably provide more accurate results. From the PROC ANOVA documentation:

 

Caution: If you use PROC ANOVA for analysis of unbalanced data, you must assume responsibility for the validity of the results.

--
Paige Miller
PaigeMiller
Diamond | Level 26

Adding

 

If you want to do Dunnett's test on interactions, you can do this with Least-Squares Means (which you should probably be using anyway with this unbalanced data). 

 

http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=statug&docsetTarget=statug_glm...

--
Paige Miller

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3860 views
  • 1 like
  • 2 in conversation