My design is as follows:
1. one dependent variable (brain activity),
2. a "condition" factor I manipulated with two levels (c1 and c2)
3. a "region of interest" factor with two levels (r1 and r2) *note that not all subjects have data in both regions
4. a "subregion" factor with one level for r1 and three levels for r2 - this subregion is nested with roi For example, region of interest can be visual cortex and auditory cortex. And I only have V1 as a subregion for visual cortex, but A1, A2 and A3 as subregions for auditory cortex.
subject roi subroi activity condition s1 n1 v1 0.34 c1 s1 n1 v1 0.68 c2 s2 n2 a2 0.18 c1 s2 n2 a3 1.27 c1 s2 n2 a2 -0.77 c2 s2 n2 a3 0.16 c2 s3 n2 a1 0.12 c1 s3 n2 a1 0.42 c2
I'm mostly interested in the interaction between condition and roi, but would like to account for the fact that there are subregions (subroi) nested under roi.
Another important point is that each subject has a different number of electrodes, so I would need to account for shared variance within subjects.
I have two questions about this design:
Is the following model correct?
lmer(activity ~ cond*roi + (1|roi:subroi) + (1|subject), data=dat)
If I do find a significant
cond*roiinteraction, can I run follow up analyses within each roi in the following manner: for n1 (with 1 level of
lmer(activity ~ cond + (1|subject), data=dat)for n2 (with 3 levels of
lmer(activity ~ cond*roi + (1|subject), data=dat)
I have come across several websites on nested effects, but most assume that the nested factor (
subroi) has the same levels across the main factor (
roi). The above code doesn't look exactly right to me given the asymmetrical levels of
subroi across n1 and n2, but I cannot think of another way to account for that. Any thoughts/suggestions would be much appreciated!