[R-sig-ME] observations in multiple groups

Ben Bolker bbolker at gmail.com
Thu Jun 9 04:19:53 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11-06-08 11:39 PM, Jeroen Ooms wrote:
> The standard assumption in multilevel modelling seems to be that every
> observation is in 1 group. However, I have an application in which every
> observation is in 2 (exchangable) groups. More precisely, I have k groups
> and k^2 observations, and there is one observations for every combination of
> groups. The groups are unordered, so I can't do e.g. 1 + (1| firstgroup) +
> (1|secondgroup). Is there a way to model this with lme4?
> 
> So the schoolbook example would be a hierarchical model with children within
> classes, however every child is in two classes at the same time.
> 

  Isn't this exactly a crossed random effect?  i.e., child k is in
classes i and j, so their expected value (in the absence of any
covariates etc.) is (grand mean) + eps_i + eps_j +eps_(error).  I'm
sorry if I'm missing something, but it seems like (1|firstgroup) +
(1|secondgroup) is precisely what you would want in this situation ... ?
 Why does it matter if the groups are ordered?

  Ben Bolker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3wLckACgkQc5UpGjwzenP82gCfXlUt9CV+7d71aZzj3gUWV/vS
a0UAnAqoKK3n44/vzv0z4LVfuP9dB4hJ
=WDgT
-----END PGP SIGNATURE-----




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