# #StackBounty: #r #mixed-model Handling baseline differences with a retrospective study and mixed model

### Bounty: 150

I am looking at the fixed effects of `Var1`, `Var2`, and `Var3` on a dependent variable `V` with a random effect across participant `ID` using the `lmer` function in R.

• `Var1` has levels `TimePoint1`, `TimePoint2`, and `TimePoint3`
• `Var2` has levels `TreatmentA` and `TreatmentB`
• `Var3` has levels `LocationX` and `LocationY`

My mixed model has the following form:

``````V ~ Var1*Var2*Var3+(1|ID)
``````

which showed a main effect of `Var1`, `Var2`, and `Var3` with no significant interactions. I thus removed the interactions and repeated the model in the following way:

``````V ~ Var1+Var2+Var3+(1|ID)
``````

which showed the same main effects.

However, here’s the catch. Factor `Var2` refers to treatment type, of which the levels are `TreatmentA` and `TreatmentB`. It turns out that upon review of baseline characteristics, I found that the ages are significantly different by t-test between people in group `Var2=TreatmentA` and people in group `Var2=TreatmentB`, but only when `Var1=LocationX` (and not when `Var2=LocationY`)

Thus, I am thinking I need to include a covariate `Age` in my original mixed model. However, since Age is only significantly different across the levels of `Var2` when `Var1=LocationX`, how should I structure my mixed model to handle this? I was thinking to just add an interaction term between `Age` and `Var2`.

``````V ~ Var1+Var2+Var3+Var1:Age+(1|ID)
``````

Thoughts? I could also extract out the subset of my data when `Var1=LocationX` and then make a mixed model just for that data with a covariate of `Age`. I’m not really sure what the appropriate approach is.

Get this bounty!!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.