[R-sig-ME] How to include temporal autocorrelation in GLMM?

Ben Bolker bbolker at gmail.com
Tue Apr 16 06:07:05 CEST 2013


Stolen, D Eric  (KSC-IHA-4400)[InoMedic Health Applications, Inc.]
<eric.d.stolen at ...> writes:

>  Dear List; I am analyzing a large data set on lemon shark
> detection/nondetection on a sonic telemetry array. The response
> variable is binomial and I am using a GLMM to account for the
> effects of individual shark (49 levels) and month nested within year
> (over 4 years). We considered several a priori structures for the
> fixed effects and model selection based on AIC showed a clear winner
> among the a priori models:
 
> glmer(detect ~ dalCat + dtemp3d + daylength + (1|shark) +
  (1|Year/month), family = binomial, data = Lemon3)

> However, the detection/nondetection was measured daily and using
> acf() on the residuals of the best GLMM, there is evidence of
> correlation over the range of 1-4 days for many of the sharks. To
> remedy this I thought of creating a set of variables which code the
> detection/nondetection for the previous 1-7 days and including them
> among the fixed effects. I created these variables, then compared
> AIC of models with all the fixed effects in the previous best model,
> plus none, 1, 2,..etc. of these autocorrelation variables.  The
> model with autocorrelation variables for previous 1-4 days was best,
> and all models with these variables outperformed the models without
> them (based on AIC). The effect sizes for the fixed effects from the
> previously considered best model are all reduced but still signific
> ant (they have decent SE). I don't think that this approach is
> correcting for the autocorrelation in regards to the variance, but
> perhaps they give more reliable estimates of effect size and SE.
 
> My questions are: does this approach make sense, and does anyone
>  know of any references that used this approach?


  It makes sense to me.   The only potential difficulty is that
it relates the _detection_ on day d to _detection_ on days d-1, d-2, ...
It would make more sense, but would be considerably more difficult
(I think you'd need WinBUGS or Stan or your own MCMC code of some sort),
to relate a latent variable giving the _presence_ on day d to _presence_
on previous days.  In other words, this works fine as long as you
assume that there is no observation error (no chance of detection
failure, or [perhaps less likely] false positives).

  Ben Bolker



More information about the R-sig-mixed-models mailing list