# What is the difference between GLM and GEE?

Whats the difference between a GLM model (logistic regression) with a binary response variable which includes subject and time as covariates and the analogous GEE model which takes into account correlation between measurements at multiple time points?

My GLM looks like:

Y(binary) ~ A + B1X1(subject id) + B2X2(time)
+ B3X3(interesting continuous covariate)


I'm looking for a simple (aimed at the social scientist) explanation of how and why time is treated differently in the two models and what the implications would be for interpretation.

First, this model assumes that your data are independent given the covariates (that is, after having accounted for a dummy code for each subject, akin to an individual intercept term, and a linear time trend that is equal for everybody). This is wildly unlikely to be true. Instead, there will almost certainly be autocorrelations, for example, two observations of the same individual closer in time will be more similar than two observations further apart in time, even after having accounted for time. (Although they may well be independent if you also included a subject ID x time interaction--i.e., a unique time trend for everybody--but this would exacerbate the next problem.)