[R-sig-ME] glmmadmb and time-effects
Ben Bolker
bbolker at gmail.com
Sun Aug 11 20:13:14 CEST 2013
Luca Corlatti <luca.corlatti at ...> writes:
>
> Dear all,
> I am trying to analyse the relationship between parasite burden and
> several internal and external variables, including testosterone,
> cortisol, age, minimum temperature, home range. I have 2 years of
> data, collected on a monthly basis. My data are not normally
> distributed and overdispersed. I therefore fitted my global model
> as:
mod <- glmmadmb(parasite~testosterone + cortisol + age + Tmin +
hr + age:testosterone + age:cortisol + (1|year:month) + (1|id),
family="nbinom", data=mydata, ZeroInflation=FALSE)
> Visual inspection of residuals suggest that the model fits the data
> adequately. Starting from here, I fitted a set of simpler models
> and ran a model selection and a model averaging of the competitive
> models.
> The parasite emission shows marked monthly variation but, clearly,
> all the independent variables as somewhat dependent on time as well,
> and if I included month (time) as a fixed factor in the model, I am
> afraid the effects of such variables would be diluted. I therefore
> decided to include time as a random factor (1|year:month), but I am
> not sure if this is a plausible choice. Kind regards, Luke
It seems plausible, although technically if your independent variables
are collinear with time, the most conservative/honest thing to do is
to admit that your variables of interest are somewhat confounded with
time. In other words, including time as a random factor should
dilute the effect slightly less than including it as a fixed factor,
but it will still dilute it some, and you can't really get around that.
If some of your variables take on more than one value at each time
step, you might consider including their interactions with time, e.g.
(cortisol|year:month) to allow for variation in the _effect_ over time
(the intercept-by-time model only allows for variation in the baseline
parasite emission over time) -- see e.g. Schielzeth and Forstmeier
Behavioural Ecology 2009 ...
More information about the R-sig-mixed-models
mailing list