# GEE: choosing proper working correlation structure

I am an epidemiologist trying to understand GEEs in order to properly analyze a cohort study (using Poisson regression with a log link, to estimate Relative Risk). I have a few questions about the "working correlation" that I would like someone more knowledgable to clarify:

(1) If I have repeated measurements in the same individual, is it usually most reasonable to assume an exchangeable structure? (Or an autoregressive if measurements show a trend)? What about independence - are there any cases where one could assume independence for measurements in the same individual?

(2) Is there any (reasonably simple) way to assess the proper structure by examining the data?

(3) I noticed that, when choosing an independence structure, I get the same point estimates (but lower standard errors) as when running a simple Poisson regression (using R, function glm() and geeglm() from package geepack). Why is this happening? I understand that with GEEs you estimate a population-averaged model (in contrast to subject-specific) so you should get the same point estimates only in the linear regression case.

(4) If my cohort is at multiple location sites (but one measurement per individual), should I choose an independence or an exchangeable working correlation, and why? I mean, individuals in each site are still independent from each other, right?? Thus for a subject-specific model, for example, I would specify the site as a random effect. With GEE however, independence and exchangeable give different estimates and I am not sure which one is better in terms of underlying assumptions.

(5) Can GEE handle a 2-level hierarchical clustering, i.e. a multi-site cohort with repeated measures per individual? If yes, what should I specify as a clustering variable in geeglm() and what should be the working correlation if one assumes for example "independence" for the first level (site) and "exchangeable" or "autoregressive" for the second level (individual)?

I understand these are quite a few questions, and some of them may be fairly basic, but still very difficult for me (and maybe other novices?) to grasp. So, any help is greatly and sincerely appreciated, and to show this I have started a bounty.

1. Not necessarily. With small clusters, imbalanced design, and incomplete within-cluster confounder adjustment, exchangeable correlation may be more inefficient and biased relative than independence GEE. Those assumptions can be rather strong, too. However, when those assumptions are met, you get more efficient inference with the exchangeable. I have never found an instance when AR-1 correlation structures make sense, since it's uncommon to have measurements that are balanced in time (I work with human subjects data).

2. Well, exploring correlation is good and should be done in data analysis. However, it really shouldn't guide decision making. You can use variograms and lorellograms to visualize correlation in longitudinal and panel studies. Intracluster correlation is a good measurement of the extent of correlation within clusters.

3. Correlation structure in GEE, unlike mixed models, does not affect the marginal parameter estimates (which you are estimating with GEE). It does affect the standard error estimates though. This is independent of any link function. The link function in the GEE is for the marginal model.

4. Sites can be sources of unmeasured variation, such as teeth within a mouth, or students within a school district. There is the potential for cluster level confounders in these data, such as genetic propensity to tooth decay or community education funding, so for that reason, you will get better standard error estimates by using an exchangeable correlation structure.

5. Calculation of marginal effects in a GEE is complicated when they're not nested but it can be done. Nesting is easy, and you do just as you've said.

• (Regarding #5) So in the case of nested clustering one just selects the top level cluster variable and that's it? Jan 30 '14 at 21:35
• No, you can create a hierarchical two level exchangeable correlation structure and consistently estimate the two separate correlation parameters for correlation using a 3 step EM algorithm. That way you would know kids within communities are correlated, but not as correlated as kids within a household. Jan 30 '14 at 21:58
• Sorry, I do not understand this. Could you point me to some code, preferably in R or Stata? I guess that should help. Jan 30 '14 at 23:04
• @TheodoreLytras sorry, I was mistaken. Your previous assertion is correct. From the very paper I linked, " In addition, if multiple clusters are perfectly nested, GEE clustering on the top level cluster accounts for the multilevel correlation structure through the sandwich variance estimator". Jan 30 '14 at 23:22
• Maybe you mean something else, but when you state "Correlation structure in GEE, unlike mixed models, does not affect the marginal parameter estimates", I think this is not true. At least, if you mean that the coefficients are unchanged by choosing a different working correlation matrix, this is not what happens: the correlation matrix works through in the weighting matrix and affects the covariance matrix as well as the coefficients.
– Nick
Jun 14 '17 at 18:52

(1) You will likely need some kind of autoregressive structure, simply because we expect measurements taken further apart to be less correlated than those taken closer together. Exchangeable would assume they are all equally correlated. But as with everything else, it depends.

(2) I think this kind of decision comes down to thinking about how the data were generated, rather than seeing how they look.

(4) it depends. For example, kids nested in schools should not, in most cases, be treated as independent. Due to social patterning, etc, if I know something about a kid in a given school, then I probably know at least a little bit about other kids in the schools. I once used GEE to look at relationships between different social and economic indicators and obesity prevalence in a birth cohort where participants were nested in neighborhoods. I used an exchangeable structure. You can find the paper here and check some of the references, including 2 from epi journals.

(5) Apparently so (e.g. see this example), but I can't help with the R specfics of doing this.

• This is helpful indeed, but it makes me wonder why would anyone then use an independence structure, because clustering per se implies a degree of similarity between observations. However, I am under the impression that in the case of schools the similarity is in relation to other schools, and within each school pupils would be independent. So I'm still not very clear on that. Jan 28 '14 at 11:38
• Yes, if you restricted your sample and subseqeuent modelling to a single school, no worries. In this case it would be more justifiable to assume the errors are iid. But once you start combining kids from different schools into the same sample/model, that assumption becomes tennuous, unless you account for school in the model, i.e. so that the errors conditional on school are assumed iid. Jan 30 '14 at 13:18
• It's also worth noting that people might be more helpful to you if you could provide some details regarding sample size, the number and timing of repeat measures, the number of clusters, etc. Jan 30 '14 at 13:32
• @DLDahly your point in (1) is not something I often find in biostatistical panel analyses. One of the assumptions behind AR-N correlation structures is that, given enough time between them, two measurements on the same individual will be as uncorrelated as two measurements between different individuals. However, the underlying major between-cluster confounders are often not time varying covariates (such as genetic markers), and assuming otherwise is very difficult (if not impossible) to assess. A lorrelogram is a very good place to start, though. Jan 31 '14 at 18:58

(0) General comments: most of the models I see on crossvalidated are far too complicated. Simplify if at all possible. It is often worth modeling with GEE and mixed model to compare results.
(1) Yes. Choose exchangeable. My unambiguous answer is based on the most widely touted benefit of GEE: resilience of estimates to assumptions made.
If you look at studies in your field you should see that exch is the default option. It doesn't mean it is the best, but should be the first to consider. Advising exch will be the best advise without having detailed knowledge of your data.
(2) Yes, there are data driven approaches such as "QIC". This is a Stata example, but widely accepted as a reasonable option, though very rarely used in practice: http://www.stata-journal.com/sjpdf.html?articlenum=st0126)
(3) Point estimates are never the exact same (unless you are using indep correlation structure), but are usually fairly close. You can find many articles comparing simple/gee/mixed effects model estimates to get a feel for this (https://recherche.univ-lyon2.fr/greps/IMG/pdf/JEBS.pdf) Most textbooks also have a table or two for this. For an independent correlation structure you are essentially running the poisson model with robust SEs. So the estimates will be the exact same. The SE are usually larger. But sometimes robust SE are smaller (that is life: google with provide pain free explanation if interested)
(4) See (1) and (2) above.
(5) No. Or better stated, you can do anything if you put enough effort into it but it is very rarely worth the effort.

You're using the wrong approach with a gee to do what you are doing because you don't know the structure and your results will be likely confounded. Refer to Jamie Robinson this. You need to use long. TMLE (mark van der laan) or perhaps a gee with iptw weights. Not accounting for correlation does underestimate variance. Just think if all repeated measures were 100% correlated, then you would effectively have way fewer observations (essentially only n for your n subjects) and smaller n means higher variance.

• If you have a non survival type of outcome you can use the gee approach with independent corr structure and iptw weights as suggested for unbiased estimates, assuming you get the propensity score right. TMLE is best pretty much in all cases, survival or not because you can use ensemble learning to predict propensity scores and sequential regressions and still obtain efficient inference. Your approach will surely be biased and give incorrect inference and the larger your sample size, if there is no effect, you will likely pinpoint a wrong significant effect!! Oct 16 '16 at 6:50
• This could use more detail. What is Janie Robinson? Which paper by van der Laan? Oct 16 '16 at 8:25
• @mdewey sorry, typo, meant Jamie Robins. Try Robins, hernan, Babette 2000 marginal structural models and causal inference--great method in there for non-survival outcome including way to do msm with effect modifiers. For laan, reference the book, targeted learning. Like I said, laan is probably best but takes more to understand. The R package Ltmle does this methodology but takes some time to learn. Oct 16 '16 at 12:10