We're trying to run a linear mixed effects model with 3 random
effects: M1, M2 and Fam. M1 & M2 are dummies. We're actually
interested in the variances of the random coefficients (& the
remaining error). The variances of the random coefficients for M1 and
M2 need to be set as equal.
The following code produces equal variances for M1 and M2 together
with error, but we want an additional random coefficient at a Family
level.
test3 <- lme(g~SES, random = list(Fam = pdIdent(~M1 + M2 -1)), data
= ToyLong, method = "ML")
Any ideas how we should amend this code?
Jeremy
Dr Jeremy Hodgen
Senior Lecturer in Mathematics Education
King's College London
Department of Education and Professional Studies
Franklin-Wilkins Building
Waterloo Bridge Wing
150 Stamford Street
London SE1 9NH
Tel: 020 7848 3102
Fax: 020 7848 3182
E-mail: jeremy.hodgen at kcl.ac.uk
Show replies by date