I have a dataset where abundance
is being changed by group
(2 categories, fixed effect) and I want to account for random effect subject
(15 subjects). Basically, each of the 15 subjects went through both groups such that the total number of samples per group and subject is 1
sample group subject abundance
s1 A id1 1.5
s2 B id1 10.1
s3 A id2 -2.3
s4 B id2 -5
...
I want to model the effect of group
on abundance
, and I also know that subject
has an effect on abundance, i.e. abundance ~ 1 + group + (1 + group | subject)
.
In total I have 22 samples, and do I get it right that by specifying the random effects above it is not possible to model the slope / intercept as indicated? But in this case, even increasing number of subjects would not help as all subjects added would still be present in both groups? I thought I could model the slope of subject
separately from that of group
. What am I missing here?
group
which is a categorical variable? $\endgroup$group
? $\endgroup$