I need to do a two way anova test with my data. I did an experiment with copepods in 3 different treatments ( control, low oil and high oil) and had 4 replicates for each treatment. So In total I have 12 different 'individuals'. I checked how many copepods were dead after 1 day, 3 days, 6 days and 8 days.
I want to check with a two way anova : (dead ~ treatment * day) the interaction of treatment and the day on the amount of dead. But I have repeated data because the same 12 'individuals' are checked on the different days.
I also tried to give ID's to each replicat and use:
aov(dead ~ treatment * dag + Error(ID/(treatment*dag)), data = ID_dead)
And that gave a warning, and also I don't know what test to use after because Tukey isn't working.
Can please someone help me?
I tried:
model.test_lm = lm(dead ~ treatment * dag, random = ~1|ID, data = ID_dead)
Warning message:
> In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
> extra argument ‘random’ will be disregarded
summary(model.test_lm)
anova(model.test_lm)
TukeyHSD(model.test_lm)
> Error in UseMethod("TukeyHSD") :
> no applicable method for 'TukeyHSD' applied to an object of class "lm"
And I also tried:
model.aov <- aov(dead ~
treatment * dag +
Error(ID/(treatment*dag)), data = ID_dead)
Warning message:
> In aov(dead ~ treatment * dag + Error(ID/(treatment * dag)), data = ID_dead) :
> Error() model is singular