I have a question according the "formula interface" from GEE models, for instance when using the
gee function from the R gee package.
Let's say I have a measured quality of life (QoL), education and sex from 100 subjects at three different time points (time). If I understand the GEE model approach correctly, GEE can be used for longitudinal, clustered data. However, I wonder what my clusters would be? The cluster variable is passed to the argument
id within the
gee function, so what would be the right syntax if I want to measure change in QoL over time, and how this change differs depending on education and sex?
- Is time my cluster variable?
gee(QoL ~ education + sex, id = time)
- Is the subject-ID my cluster?
gee(QoL ~ education + sex + time, id = subject-ID)
However, this looks like a random slope approach of mixed models to me.
- Is probably education my cluster?
gee(QoL ~ sex + time, id = education)
- Last: I don't have any real clusters. But what would I then choose to analyze the longitudinal data, to account for the correlation of my DV QoL for same subjects at different time points?
Maybe I'm confused because I try to compare the formula syntax to the one from longitudinal data analysis with
lme4, where the decision which variables to choose for random intercept and slope is quite clear (time and subject) - however, if I do not have individual differences (i.e. I'm interested in the population average), what are the clusters in GEE model for?