Dear all,
I'm struggling to understand how lmer handles contrasts. I have a lexical
decision experiment that I'm trying to analyse, where regular or irregular
verbs (the targets) are preceded by four different kinds of prime, making it
a (2x4) within-subjects design. I'm pretty sure I have the basic model
specification right, i.e. something like this:

priming.model<-lmer(react~target*prime+(1|subject)+(1|item),data=trimmedwords)

The contrasts I would be most interested in are comparing the first prime
condition to the third, and the second to the third. Initially I was
planning to set the contrasts for the prime factor like this (I realise
these are not orthogonal, is this a problem?):

primeconts<-cbind(c(-1,0,1,0),c(0,-1,1,0),c(0,0,-1,1))
colnames(primeconts)<-c("1v3","2v3","3v4")
primeconts
     1v3 2v3 3v4
[1,]  -1   0   0
[2,]   0  -1   0
[3,]   1   1  -1
[4,]   0   0   1

However, I've been told by one of the other researchers here that you need
the contrasts in the form given by make.contrasts() in the gmodels package,
which creates contrasts "in the form that R requires". I'm having trouble
finding out exactly what this command does in the package documentation, and
I'm a little wary of using something I don't understand. For the set of
contrasts above, make.contrasts() returns:

      C1    C2    C3
V1 -0.75  0.25 -0.25
V2  0.25 -0.75 -0.25
V3  0.25  0.25 -0.25
V4  0.25  0.25  0.75

but when I've used a different set of contrasts (albeit possibly not the
most sensible ones), it returns something a lot less understandable, hence
my hesitation:

make.contrasts(rbind(c(-1,0,1,0),c(0,-1,1,0),c(-1,1,0,0)))
              C1         C2            C3
V1 -3.333333e-01  0.0000000 -3.333333e-01
V2  3.148450e-17 -0.3333333  3.333333e-01
V3  3.333333e-01  0.3333333 -2.775558e-17
V4  0.000000e+00  0.0000000  0.000000e+00

The first set of contrasts given by make.contrasts() looks like what I'm
familiar with from linear regression, where you set the coefficients for the
groups in the contrast so that their mean is 0 and the difference between
them is 1, so that the intercept in the regression output represents the
overall mean, and the unstandardized beta for the contrast effect gives you
the difference between the groups (i.e. the contrast estimate) directly.

Can anyone shed some light on the best way to code the contrasts? If it is
the make.contrasts() method, I would appreciate a brief explanation on what
that function actually does, in terms of the properties of the matrix it
returns.

Thanks in advance,
Marius

	[[alternative HTML version deleted]]


