I have a single continuous measurement that I collected from 40 different mice. They were separated into eight enclosures under one of four different light treatments (each treatment was applied in duplicate). My experiment tested two species of mice, both male and female, but these ratios were not equal. I am mainly interested in the differences between light treatments and not between enclosures, though I would eventually like to evaluate that, as well. Would my data be best suited for a nested ANOVA model, or a linear mixed effects model? What should the formula look like?
I know that this cannot be a two-way ANOVA since the subgroups were of unequal sizes. I am not sure what the random variable would be. I believe that the groups are the light treatments, and that the subgroups would be sex and species (and maybe enclosure number?).
Here is what I found online for an "unbalanced two-way ANOVA":
model3 <- aov(NSTC ~ Sex*Species*Light, data=NSTC)
Anova(model3, type = "III")
And this is a code I found for nested ANOVA that is giving me an error, even though I do specify a random effect term ("No random effects terms specified in formula")
model4 = lmer(NSTC ~ Light+Species+Sex, random=~1|ID,
data=NSTC,
REML=T)
I expect that my data will show very little significance, but I am basically seeing none from the code I have tried thus far.
Aucun commentaire:
Enregistrer un commentaire