I'm trying to make sure that I'm using mixed models in the correct way. I measured enzimatic activity in 10 specimens (5 female and 5 male), each one measured in three technical replicates. These measurements were made during the four seasons in two different years. I would like to know if Season, Sex and the interaction between Season and Sex have effect on enzimatic activity. So I considered as fixed effects Season (4 levels), Sex (2 levels) and Season*Sex, and as random effects Year.
head(data)
Specimen Replicates Activity Sex Season Year
1 A 184.78 F AUT 1
1 A 179.18 F AUT 1
1 A 183.48 F AUT 1
2 B 162.77 F AUT 1
2 B 161.01 F AUT 1
2 B 154.53 F AUT 1
Iam using these:
model1=lmer(Activity~Season+Sex+Season*Sex+(1|Year))
but interaction wasn't significant, so I simplified to:
model2=lmer(Activity~Season+Sex+(1|Year))
Is it right?
I know that R typically treat all observations having the same set of predictor variables as technical replicates, but Iam not sure if I should to specify the "Specimen" in my model, like this...
model3=lmer(Activity~Season+Sex+(1|Specimen)+(1|Year))
...to R recognize my technical replicates as technical replicates instead outcomes from different subjects.
I know that I could use the mean of my technical replicates as my dependent variable (Activity) but I would like to use all my data in this analysis.
Someone can help me with this issue?
Thanks in advance.
Best regards
D.
Year
is far too low for a random effect, change that to a fixed effect. $\endgroup$Season+Sex+Season*Sex
is redundant, all you need isSeason*Sex
because that includes both main effects and interactions. R might deal with that intelligently, though, so it may not make a difference. $\endgroup$Specimen
mean exactly, and how is it different fromReplicate
? Can you post your data usingdput()
or at least a reproducible example illustrating the structure? $\endgroup$