[R-sig-ME] cross-over design

Soyeon Ahn iamyeoni at gmail.com
Wed Feb 16 10:11:14 CET 2011

Dear all,

I have a repeated binary measurements and can't figure out how my data
will work.
Response (dependent, Y/N) was repeatedly recorded across Time
(categorical : 3 time points) with different Treatments (categorical :
2 levels).
The problem is that each subject was only assigned either the first or
the second time point. All were assigned into the third time point,
though. Thus, it seems to me that Subject (random) is cross-over withn
Time (fixed) effect.

For example,

    	    Treatment	 Time	Res
sub1	    A		 1	Y
sub1	    B		 1	N
sub1	    A		 3	Y
sub1	    B		 3	Y

sub2	    A		 2	Y
sub2	    B		 2	Y
sub2	    A		 3	N
sub2	    B		 3	N

So far, I have played around the following models and I feel that the
fist one produces feasible outcomes, even though the last one seems to
be the right syntax.

lmer(TGA ~ Treatment + Time + (1|Time) ,family=binomial)
lmer(TGA ~ Treatment + Time + (1|sub) ,family=binomial)
lmer(TGA ~ Treatment + Time + (1|sub) + (1|Time) ,family=binomial)

Can anyone suggest a solution to this? And please correct me if I'm wrong


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