[R-sig-eco] Binomial GLMM or GAMM with random intercept and temporal correlation

Bob O'Hara bohara at senckenberg.de
Tue Aug 26 21:15:31 CEST 2014


On 08/26/2014 07:34 PM, SamiC wrote:
> Dear ecology mailing list,
>
> I am trying to model some binomial data (0/1) as a function of sex (0/1) and
> DistanceToFeature (continuous km’s) with an interaction between the two.  My
> data is nested and I therefore want to include a random intercept for
> InidividualID and within that I want to include an AR1 correlation structure
> as the data is serially/temporally auto-correlated.  I understand any
> correlation structure should be nested within the random effect.
>
> So far I have tried running the model using glmmPQL as
>
> glmmPQL(Y ~ DistanceToFeature * Sex + (1|InidividualID),
> correlation=corAR1(form=~1|IndividualID/ContinuousBout), family=’binomial’,
> data=’birds’)
>
> (note – ContinuousBout is an ID for where there are time gaps in the data).
>
> However, although this runs, am I right in understanding that I should not
> use PQL estimation with binomial data as it gives biased results?  Does
> anyone know of a way I can model this?

Bernoulli responses are tricky things, so I'd be a bit worried that you 
might be trying to fit too complex a model. But anyway....

If you don't mind going Bayesian, you could try INLA (R-INLA.org).

Alternatively, could you simply include the previous time step's value 
as a covariate?

> I understand that this is also the case if I wish to use GAMM (as later I
> will be modelling a non-linear explanatory as well)?
Yes - a GAM is just a GLMM with a complicated covariate structure.

> Additionally I will also be running a similar set up but where the data are
> not equally spaced in time (and therefore an AR1 structure would not apply).
> Can anyone give a recommendation of a modelling framework for this also.
That should come from the subject matter - I can think of a couple of 
approaches, but they make different assumptions about how your system is 
behaving.

Bob

-- 
Bob O'Hara

Biodiversity and Climate Research Centre
Senckenberganlage 25
D-60325 Frankfurt am Main,
Germany

Tel: +49 69 7542 1863
Mobile: +49 1515 888 5440
WWW:   http://www.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Journal of Negative Results - EEB: www.jnr-eeb.org



More information about the R-sig-ecology mailing list