Skip to content

Is a mixed effects appropriate?

2 messages · Ross Ahmed, Ben Bolker

#
Ross Ahmed <rossahmed at ...> writes:
I would say that 

anova(lme(day~site, random=~1|year,data=df))

would be a reasonable model, allowing for random variation among years.

I do think it would make sense to look for trends across time

anova(lme(day~site*year, random=~1|year,data=df))

  (there is a fixed effect and a random effect of year in this
model, but it should be OK because the random effect treats year
as a categorical variable ... as long as the fixed effect is
a numeric (continuous) variable)

You should definitely make sure to look at graphical representations
of the data! But obviously your made-up data set doesn't
have anything to see in it ...