# Logistic regression with repeated measures?

I would like to make a prediction for a (new) subject to have a certain outcome given the historical data and the model:

glm(outcome ~ age + treatment + history, family=binomial, ...)


however in the historical data that will be fitted by the model, I have some sort of repeated measurements on some of the subjects (and I don't know if repeated measures is the appropriate term to be used here, hence using lmer etc is doubtful); example:

subject_ID    age    treatment    history    outcome
S_1           33      T_1         H_1        0
S_2           27      T_2         H_2        1
S_2           27      T_3         H_2        1
S_3           56      T_1         H_11       0
etc...


In this example subject_2 (S_2) has two rows because he had simultaneously two different treatments at the same time. could a logistic regression still be used or should cases like subject_2 be removed from the analysis?

If all of those repetitions are exactly like you've described here for the subject S_2 (i.e., simultaneous application of treatments), I would collapse these two lines together and fill in the treatment as an additional level of the treatment, namely the interaction of treatments T_2 and T_3.

• I was thinking along similar lines. So there would be a new level we'll call it T_2_3 which applies as treatement for the cases having both T_2 ans T_3. So the the two rows become one row: S_2 27 T_2_3 H_2 1 Sep 21 '12 at 8:37
• Yes, that's exactly what I meant. Sep 21 '12 at 10:56

I doubt about your use of repeated measures, because normally people talk about repeated measures (longitudinal studies) when subjects receive measurements at different time points. For example, children are measured heights and weights when they are 2, 4, 6, 8, and 10 years old.

Since S_2 (and maybe more subjects) in your data receives simultaneous treatments while others are not, I suspect that RM may not be a proper tool to use. I think if you include interactions instead, there would be so many involved, which will further complicate the problem...

• indeed here there are no logitudinal data. Sep 21 '12 at 8:40

@StasK gives a good method. Another possibility is to have one variable called "treatment" but have values for it that include multiple treatments - e.g. if there are three possible treatments, the new variable could have levels of none, t1, t2, t3, t12, t13, t23 and t123.

I think the results ought to match with the interaction approach, but they may be easier to interpret.