[R] lme4 and incomplete block design

Christian Lerch t.c.l at gmx.net
Sun Nov 8 00:05:57 CET 2009


Dear list members,

I try to simulate an incomplete block design in which every participants 
receives 3 out of 4 possible treatment. The outcome in binary.

Assigning a binary outcome to the BIB or PBIB dataset of the package 
SASmixed gives the appropriate output.
With the code below, fixed treatment estimates are not given for each of 
the 4 possible treatments, instead a kind of summary measure(?) for 
'treatment' is given.

block<-rep(1:24,each=3)
treatment<-c(1, 2, 3, 2, 1, 4, 3, 4, 1, 4, 3, 2, 1, 3, 4, 2, 4, 3, 3, 1, 
2, 4, 2, 1, 1, 4, 2, 2, 3, 1, 3, 2, 4, 4, 1, 3, 1, 2, 3, 2, 1, 4, 3, 4, 
1, 4, 3, 2, 1, 3, 4, 2, 4, 3, 3, 1, 2, 4, 2, 1, 1, 4, 2, 2, 3, 1, 3, 2, 
4, 4, 1, 3)
outcome<-c(0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 
0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 
0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 
0, 0, 1, 0)
data<-data.frame(block,treatment,outcome)
lmer(outcome~treatment +(1|block), family=binomial, data=data)

Is this a problem with the recovery of interblock estimates? Are there 
special rules how incomplete block designs should look like to enable 
this recovery?

Any help is appreciated!

Regards,
Christian




More information about the R-help mailing list