Generalized Estimating Equations

I will probably look back at this in a few years and laugh at how much I struggled with understanding this topic. In the meantime, I’m going to compile my notes so I have something with Latex for the future if I ever need it yknow.

What is the point of GEEs?

Generalized Estimating Equations are an extension of Generalized Linear Models for dependent data. The covariances that exist between clusters of data are accounted for by the variance-covariance structure that’s specified in the model. I won’t pretend to know the theory behind why this works, or why that misspecification of this structure still results in consistent estimations.

In a longitudinal setting, the clusters exist for each patient, since they have data at multiple times. We will call this patient indicator \(i\). Since the outcome is postoperative pain, it makes sense to use an autocorrelation structure, since closer timepoints are more correlated than further timepoints.

My scenario

The most basic version of a GEE (with the treatment effect as the estimand) is as follows

\[E(Y_{it}) = \beta_0 + \beta_T A_{it} + Z_{i}^{T} \boldsymbol{\beta}\]

What this gives us is the ATE aggregated over all the time periods we have, represented by \(\beta_T\).

This could be useful in certain circumstances, but in ours, we want to know if non-opioids are superior/non-inferior to opioids at each time point available in our data. To do this, we need to start accounting for more variables. Before addressing that, we need to make sure that we account for the fact that pain diminishes over time naturally without any medication. To account for that, we add indicators for times 2 to 6, making time 1 the baseline.

\[E(Y_{it}) = \beta_0 + \beta_T^{*} A_{it} + \sum_{k=2}^6 \gamma_k I(t = k) + Z_{i}^{T} \boldsymbol{\beta}\]

Now the estimator \(\beta_T^{*}\) is no longer the same as \(\beta_T\). \(\beta_T^{*}\) is the average ATE over all time points accounting for pain reduction over time. However, we don’t just want the average ATE over all time points (that accounts for natural pain reduction over time). We want time-specific ATEs due to our research question. To do so, we add an interaction effect:

\[E(Y_{it}) = \beta_0 + \beta_{T,t=1}^{*} A_{it} + \sum_{k=2}^6 (\gamma_k I(t = k)) + \sum_{k=2}^6 \delta_k (A_{it} * I(t = k)) + Z_{i}^{T} \boldsymbol{\beta}\]

Again, the interpretation of the estimator changes. Now that we estimate how the treatment effect changes over time with \(\delta_k\) from times 2 to 6, the parameter \(\beta_{T,t=1}^{*}\) reduces down to the ATE at time 1, even though the entire 6 treatment observations are included.

In fact, \(\delta_k\) represents the ADDITIONAL effect of the treatment at a given time k. As a result, to find the ATE at time k, it is \(\beta_{T,t=1}^{*} + \delta_k\).

Also notice that:

\[\sum_{k=2}^6 \delta_k (A_{it} * I(t = k)) = \sum_{k=2}^6 \delta_k A_{ik}\]

I have discussed weighting in a different blog post, which will be relevant for weighted GEEs. Again, I don’t really know the theory. I will just use the nice R packages someone already made. Just a note for myself that with weighted GEEs, I should bootstrap to find the variance of my estimators, because without that, my variances will be too conservative.




Enjoy Reading This Article?

Here are some more articles you might like to read next: