Timeline for Clarification on nesting fixed effects within random effects in an mixed effect model
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2017 at 10:21 | history | edited | amoeba | CC BY-SA 3.0 |
added 10 characters in body
|
Jul 23, 2017 at 22:57 | comment | added | rhomboideus capitis | Thank you, this was very helpful. i found this wonderful site which shows how to replicate what aov does with lme and lmer. i'll put it here just in case someone in the future needs it dwoll.de/rexrepos/posts/… | |
Jul 23, 2017 at 18:58 | comment | added | amoeba |
[cont.] But the second lmer formula is different! E.g. if your season variable has 4 levels, then (1|Site:Seasons) estimates one random intercept whereas (Seasons|Site) estimates four random terms and 4*3/2=6 correlation parameters between them. So this last model is a quite a bit more complex. But I'd say it's more common approach in the mixed models field. You will rarely see terms like (1|Site:Seasons) in the literature on mixed models; I only saw them in the discussions of how to make lmer match results of aov .
|
|
Jul 23, 2017 at 18:55 | comment | added | amoeba |
Regarding terminology, I don't think there are various meanings of "nested"; color and seasons are NOT nested within sites, and that's it. However, it does make sense to write e.g. Site/Seasons in lmer or aov formulas, and so the formula is the same as if they were nested. Hence the confusion between repeated measures and nested factors. Regarding formulas, your aov formula is the correct RM-ANOVA specification and yes, it's equivalent to your first lmer formula.
|
|
Jul 23, 2017 at 17:55 | comment | added | rhomboideus capitis | Sorry about the formatting i can't seem to get the 4space indentation right. correct me if i'm wrong, my understanding of the models i wrote in my last comment is that they are essentially saying that the effect of "Season" and "color" may vary by "Site" therefore we are allowing each Site-Seasons-Color combination to have their own variation. | |
Jul 23, 2017 at 17:36 | comment | added | rhomboideus capitis |
Ok so are you saying that there are different definition of nested at play here? meaning nested for mixed effect is not the same for repeated measures. also is: aov(Abundance ~ Seasons*Color + error(Site/(Seasons*Color)),data=data) the same as: lmer(Abundance ~ Seasons*Color +(1|Site)+(1|Site:Seasons)+ (1|Site:Color),data=data) and: lmer(Abundance~ Seasons*Color+(Color+Season|Site),data=data)
|
|
Jul 23, 2017 at 10:38 | comment | added | amoeba | Here is a essentially the same question that I asked some time ago: stats.stackexchange.com/questions/232109 but unfortunately without satisfactory answer. At some point I am planning to post an answer there myself. | |
Jul 23, 2017 at 7:58 | history | edited | amoeba |
edited tags
|
|
Jul 23, 2017 at 7:57 | comment | added | amoeba |
[cont.] The full model in your case would be color*season+(color+season|site) . But one can choose to use a simpler model color*season+(1|site) ; recommendations differ.
|
|
Jul 23, 2017 at 7:56 | comment | added | amoeba | Yes, they are crossed. However, color and season are repeated measures on each (random) site. To mimic in lmer what classical repeated-measures ANOVA is doing to analyze this design, one needs to include (1|site) and also (1|site:season) which together are equivalent to (1|site/season). The idea is that each site can have its own random deviation from the rest but also each site-season combination can have its own random deviation as well. In mixed models logic, it is much more common to use (season|site) approach. | |
Jul 22, 2017 at 23:25 | comment | added | rhomboideus capitis | They also suggested nesting "color" but they were less sure about that. For each color-site-season combination there is only one abundance measurement. I don't understand why i would need to nest season and abundance within site. to me they look like they are crossed not nested within site. | |
Jul 22, 2017 at 22:31 | comment | added | amoeba | If somebody suggests you to nest season within site, why don't they suggest to nest color within site as well? From your description, it sounds like color and season are in the same relationship with site. Another question: for each color-site-season combination, do you have 1 abundance measurement, or more? | |
Jul 22, 2017 at 22:27 | history | edited | amoeba | CC BY-SA 3.0 |
added 16 characters in body; edited tags
|
Jul 22, 2017 at 21:07 | history | asked | rhomboideus capitis | CC BY-SA 3.0 |