Test for interaction contrasts using Prism or R Please reference this question (stats.stackexchange.com) http://bit.ly/got8Bs for study design and initial reply from caracal.
My question now is: How can I test for an interaction contrast between two groups as (s)he suggested? I'm on the science side of things (minimal stats expertise) and use Graphpad Prism for basic analyses. I also have a primitive understanding of R. Is it possible to test H1′:(μ12−μ11)>(μ22−μ21) using either of these programs?
Thanks again!
 A: Since you've got a 2x2 design, there is only one (unique) interaction contrast. In that case, the interaction-test in the two-factorial ANOVA is equivalent to the two-sided test of the given contrast. Since you've got a one-sided a-priori hypothesis, you can take the interaction p-value of the ANOVA output and divide it by 2. If you want to test other (non-interaction) contrasts as well, you may have to think about p-value adjustment. In R:
> Nj  <- c(41, 37, 42, 40)     # generate some data in a 2x2 design
> DVa <- rnorm(Nj[1], 0,   1)
> DVb <- rnorm(Nj[2], 0.3, 1)
> DVc <- rnorm(Nj[3], 0.6, 1)
> DVd <- rnorm(Nj[4], 1.0, 1)
> DV  <- c(DVa, DVb, DVc, DVd)
> IV1 <- factor(rep(1:2, c(sum(Nj[1:2]), sum(Nj[3:4]))))
> IV2 <- factor(rep(c(1:2, 1:2), Nj))
> summary(aov(DV ~ IV1*IV2))    # ANOVA with interaction test
             Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1           1  20.959 20.9593 21.8302 6.392e-06 ***
IV2           1   2.358  2.3577  2.4556   0.11913    
IV1:IV2       1   3.172  3.1722  3.3040   0.07103 .  
Residuals   156 149.777  0.9601                      

# test single contrast in associated one-way design
> IV <- interaction(IV1, IV2)    # factor for associated one-way design
> cc <- c(-1/2, 1/2, 1/2, -1/2)  # contrast coefficients
> library(multcomp)              # for glht()

# test single contrast, p-value = 0.5 * that of ANOVA interaction test
> summary(glht(aov(DV ~ IV), linfct=mcp(IV=cc), alternative="less"))
         Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: User-defined Contrasts
Fit: aov(formula = DV ~ IV)
Linear Hypotheses:
       Estimate Std. Error t value Pr(<t)  
1 >= 0  -0.2819     0.1551  -1.818 0.0355 *

