# How to analyze GEE with unevenly spaced observations?

I am interested in using Generalized Estimating Equations (GEE) to model longitudinal count data. I recorded animal count observations on the same sites on many days but the spacing of the observations was uneven. I was wondering if there is a way to specify this uneven structure when using an autoregressive correlation structure?

for example, when using lme from the nlme package to analyze linear mixed models it is possible to specify the correlation structure as:

correlation = corAR1(form = ~DAY | Subject)


That way the spacing of the observations for the autoregressive structure is adjusted based on DAY. Is there a way to do this in R in a GEE model using a package such as geepack, gee, or any others?

Thanks, Dan

• Don't think it's possible as help states "The length of id (identifying clusters) should be the same as the number of observations". However it would be interesting if someone could propose a substitute. – Etienne Racine Feb 23 '12 at 15:30
• This doesn't really answer the question but you could just use an independence GEE and then this is no longer an issue. – Macro Jun 26 '12 at 1:16

When using the geeglm fonction (in geepack), you can specify the order and the spacing between observations with the waves argument.

• Welcome to this site! A working example or short illustration would be highly appreciated. – chl Jul 12 '12 at 20:10
• May I ask you to provide an example how to specify the spacing with the waves argument? – Martin Feb 17 at 0:21