## How to do a contrast analysis on a two-way ANOVA interaction

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

jant90
Posts: 2
Joined: Wed Jan 15, 2014 7:50 pm

### How to do a contrast analysis on a two-way ANOVA interaction

Hi all!

For my research I have a 2 x 3 design, both variables are nominal. Therefore I performed a two-way ANOVA, or Univariate in SPSS. This is basically what the design looks like:

For the variable that contains 3 groups (customer type) I already had SPSS do the contrast analysis (simply via the GUI) and found out that not all groups differ significantly from each other.

But because the interaction between de two variables is significant, my instructor told me I need to perform a contrast analysis on all possibilities of the interaction, meaning I need to run 9 contrasts in total. However, the 3 most important contrasts for my hypotheses are:
treatment 1 vs. treatment 2
treatment 3 vs. treatment 4
treatment 5 vs. treatment 6

To visualize things a bit, thost contrasts are marked with a red circle in the graph below:

Can anyone show the right syntax to run the contrast analyses for the 3 contrasts that are marked in the graph?

Below is the current syntax for the ANOVA, I really don't see how I can do the required contrasts as the only way I know how to do a contrast is by supplying ONE variable, like "/CONTRAST(customer_type)=SPECIAL(-1 1 0)". That way only a contrast analysis is performed on 2 groups of the customer_type var. But I need to compare "customer type 1 who has seen ad 1" (treatment 1) with "customer type 1 who has seen ad 2" (treatment 2) and that's basically crossing of the customer type and ad type variables (interaction) and you can't supply that interaction in the contrast.

Code: Select all

``````UNIANOVA Ab BY ad_type customer_type
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/POSTHOC=customer_type(TUKEY)
/EMMEANS=TABLES(customer_type)
/PRINT=DESCRIPTIVE
/CRITERIA=ALPHA(.05)
Can anyone tell me how I can solve this?

Thanks!
jant90
Posts: 2
Joined: Wed Jan 15, 2014 7:50 pm

### Re: How to do a contrast analysis on a two-way ANOVA interac

After many hours of struggling I think I finally got it:

Code: Select all

``````UNIANOVA Ab BY customer_type ad_type
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/CRITERIA=ALPHA(.05)
/LMATRIX = "ad1 vs. ad2 for customer type 1"
customer_type*ad_type 1 -1 0 0 0 0 ad_type 1 -1
/LMATRIX = "ad1 vs. ad2 for customer type 2"
customer_type*ad_type 0 0 1 -1 0 0 ad_type 1 -1
/LMATRIX = "ad1 vs. ad2 for customer type 3"
customer_type*ad_type 0 0 0 0 1 -1 ad_type 1 -1