[R-sig-ME] Specification of design matrix for random effects (Z)
James Hughes
jphughes at u.washington.edu
Wed May 2 01:24:06 CEST 2012
Hello
I would like to specify the following model using lmer:
Y_ij ~ Binomial(N,p_ij)
p_ij = u + b_i + b_j
where b ~ N(0,s^2).
For example, for the 5 observations (Y_12, Y_13, Y_23, Y_14, Y_24) the
random effect vector would be b = (b_1, b_2, b_3, b_4) and the design
matrix for the random effects (Z) would be
Z <- matrix(c(1,1,0,0, 1,0,1,0, 0,1,1,0, 1,0,0,1, 0,1,0,1),5,4,byrow=T)
Can such a model be specified in lmer? Thanks for your thoughts.
Jim
More information about the R-sig-mixed-models
mailing list