[R] Multcomp for interaction term

Worthington, Thomas A thomas.worthington at okstate.edu
Fri Mar 28 06:37:23 CET 2014


Dear All

I have a model of the form Approaches ~ Setup * Minute, where Setup has two levels and Minute has three levels. 

I want to test the difference between the levels of setup (Control vs Test) within in levels minute e.g. the difference between the two setups for Minute 1, Minute 2 and Minute 3.

In the example from  'Additional multcomp Examples' by Torsten Hothorn the contrast matrix is described for  a situation where the factor of three levels is nested within the factor of two levels, whereas I need a matrix for the other way round (the factor of two nested within the factor of three)

I have added matrix from the 'Additional multcomp Examples' example (adapted for my data) in case it is of use

Any suggestions on the alternate matrix format would be greatly appreciated 

Tom
 

structure(c(-1, -1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 1, 1, 0, 
0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 1, 1
), .Dim = c(6L, 6L), .Dimnames = list(c("Control:MIN2 - MIN1", 
"Control:MIN3 - MIN1", "Control:MIN3 - MIN2", "Test:Control:MIN2 - MIN1", 
"Test:Control:MIN3 - MIN1", "Test:Control:MIN3 - MIN2"), c("MIN1", 
"MIN2", "MIN3", "MIN1", "MIN2", "MIN3")))



More information about the R-help mailing list