Skip to content
Prev 9890 / 20628 Next

how to impose same variance for two random effects with fixed correlation patterns?

Dear all,

Pinheiro & Bates (1996) give an example of use of pdBlocked to represent
a two-level mixed-effects model as a single-level model (p. 162):

# two-level model
lme(yield ~ nitro, data = Oats,   random = list(Block=pdIdent(~1), 
Variety=pdIdent(~1)) )

# single-level model
lme(yield ~ nitro, data = Oats,
      random = list(Block=pdBlocked(list(pdIdent(~1),pdIdent(~Variety-1))))

This yields a diagonal covariance matrix with variance sigma_1^2 in the 
first block
and variance sigma_2^2 in the second block.

I would like to have the SAME variance in both blocks (this would be a way
to impose that the two variances in the corresponding two-level model
are equal).

I have looked at pdConstruct.pdBlocked to see whether it was
possible to impose this restriction but the code is daunting and
I would appreciate any help about how to proceed.

Best,

Gabriel

P.S. Let me know if my question (or the previous one about
how to make the covariance matrix for random effects depend
on some characteristics of the grouping factor) is more
appropriate at R-help .