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

  • $\begingroup$ 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. $\endgroup$ Feb 23, 2012 at 15:30
  • 1
    $\begingroup$ This doesn't really answer the question but you could just use an independence GEE and then this is no longer an issue. $\endgroup$
    – Macro
    Jun 26, 2012 at 1:16

1 Answer 1


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.