[R-sig-ME] Question: incorporating paired data into mixed models

Julie Kern juliekern27 at googlemail.com
Mon Jul 16 20:47:00 CEST 2012


Dear R gurus,

Apologies in advance if this is very simple, I’m new to R.  I’m
analysing playback data which is paired but also contains repeated
measures. Playbacks involved 2 calls, one the experimental treatment
(alarm call), one the control treatment (contact call), both of the
same individual. Each of 4 groups received 6 playback pairs of the
alarm & contact call but none of the callers were used more than once
(i.e. 1 pair). Here’s a data sample:

Treatment	        Caller.ID	Group	Latency
Control	        AM001	A	580
Experimental	AM001	A	45
Experimental	BM001	B	3
Control	        BM001	B	91
Control	        CF001	C	600
Experimental	CF001	C	22
Experimental	DM004	D	130
Control	        DM004	D	139
Experimental	AF001	A	14
Control	        AF001	A	384

At the moment I’m using group as a random term in a mixed model but
can’t work out how to specify the paired design. i.e. does my code
just test all the experimental vs all the control, rather than testing
the difference between each specific pair?
Model<-lme (Latency~Treatment, random=~1|Group, data=mydata, method="ML")

Does it work if I add pair as a random factor?

I’ve searched through the mailing lists but can’t seem to find an answer.

Many thanks for your help!

Julie



More information about the R-sig-mixed-models mailing list