Assuming the attached dataset, I am looking to examine whether participants who are treated are more/less likely to have high addiction severity compared to non-treated.
Both treatment and high addiction severity are time-varying (ie, re-assessed at each visit).
Given the correlated nature of the data, I think GEE would be a good fit. If my understanding in right, this approach would tell me if, on average, treated people are more/less likely to have high addiction severity compared to non-treated people.
However, someone has suggested that I use a mixed model to explore differences among treated and non-treated individuals with respect to this covariate (and other ones).
I have read a bit about the distinction between the 2 methods and understand that GEE gives us population-average effects whereas a mixed model would give us subject-specific effects (between-subject differences are treated as random). This distinction makes sense to me in the context of a time-fixed covariate but cannot really understand how it would work in the context of a time-varying covariate …Would this analysis make sense, and if so, how would the results be different compared to a GEE?
There is an issue of temporality/reverse causality here but please ignore for now as I am trying to understand the distinction between the 2 methods.

If you are going to have a "time" factor then Dimitris Rizopoulos correctly points out that GEE is problematic with missing values (presumably the 3rd, 4th and/or 5th visits are missing in the example data).
If OTOH your design simply allows for a variable number of visits then I'm pretty sure you can use GEE which does allow variable cluster sizes. Each subject is a cluster with anywhere from 2 to 5 (or whatever the range is in the full data) observations.
– Brent Hutto Jan 30 '19 at 11:20