[R-sig-ME] Is there an R function for GLMM with binary response, nested random factors, and temporal correlation?

Andrew Digby andrewdigby at mac.com
Thu Aug 9 02:49:14 CEST 2012

Thank you for your advice. Can I interpret it  to mean that it's not correct to specify a correlation structure (beyond that induced through random effects) in generalised models? I had thought that although prone to some issues, this was possible; see e.g. Ben Bolker's and Alain Zuur's reponses here: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2012q1/014937.html. In my case, I think I do have 'small-scale correlation', with repeated measures of a subject taken in rapid succession on a particular day. My residuals don't show gross heterogeneity, so I may not need to alter the variance structure to allow for that.

I'd be grateful for general advice on whether a GLM with temporal correlation structure is an adequate method in this case. Or should I tackle MCMC instead? (I have Zuur et al's excellent books.) However, this is a small part of my overall analysis, so I'd prefer to keep things as simple as possible!

Many thanks for your help,


On 9/08/2012, at 03:19 , Douglas Bates <bates at stat.wisc.edu> wrote:

> On Tue, Aug 7, 2012 at 5:21 PM, Andrew Digby <andrewdigby at mac.com> wrote:
>> Despite lots of investigation, I haven't found any R packages might be suitable for the following problem. I'd be very grateful for suggestions.
>> I have three-way nested data, with a series of measures (obs) taken in quick succession (equal time spacing) from each subject on different days. The measures taken on the same day are temporally correlated, so I'd like to use an AR1 correlation structure for those, but treat subjects and days as nested random factors (random intercept) since there is little temporal correlation between days. The response is binary.
>> So I need a GLMM with a correlation structure. I've tried using GEE, but the R packages can't cope with multilevel nested data. The only R function I've found that can do this is glmmPQL.
> Before you look for an R function, you should first check whether
> there is indeed a statistical model with the properties that you
> mention.  In the standard definition of a generalized linear mixed
> model, and the only one that makes sense to me, the conditional
> distribution of the response given the random effects has independent
> components.
> Aspects of linear mixed models that depend on being able to model the
> variance-covariance of the response separately from the mean don't
> carry over to generalized linear mixed models.  One of the fundamental
> properties of GLMs and GLMMs is that the variance does depend on the
> mean.
>> m <- glmmPQL(y ~ f1 * f2 * f3 + (1|subj/day), correlation=corAR1(form =~obsno|subj/day))
>> f1 - f3 are fixed factors
>> However, PQL estimation is not recommended for binary response data. With no AIC and unreliable p values, model selection seems impossible! So my question is:
>> 1) are there any other functions which are suitable for a GLMM with multilevel nested random effects and a AR1 correlation structure? Or is MCMC the only option?
>> 2) to make things more complicated, I'd also like to include a varFunc variance structure to cope with heterogeneity. Is this possible in ML methods in R? I'd also like to extend to a multinomial response at a later stage.
>> GEE seems the best bet, but I come unstuck with the three-way nested factors.
>> Thanks for your help.
>> Note: I originally posted this on R-help, but it was suggested that this list might be more appropriate.
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

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