[R-sig-ME] observations in multiple groups
Jarrod Hadfield
j.hadfield at ed.ac.uk
Thu Jun 9 16:18:07 CEST 2011
Hi,
I think Jeroen is after a multimembership model. Levels of firstgroup
can correspond to levels of secondgroup and they should have the same
associated random effect. Doug has suggested before that it may be
possible with some work:
http://r.789695.n4.nabble.com/NLME-LMER-Multiple-Membership-Models-td845071.html
Alternatively ASReml, MLwin, MCMCglmm and I'm sure others can fit
these types of model.
Jarrod
On 9 Jun 2011, at 03:19, Ben Bolker wrote:
> -----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-----
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list