# Mixed-effects modelling of pairwise changes (indirect change)

It is straightforward to model "direct" changes using a mixed-effects model. Let's assume we have 3 correlated measures over time from a subject, y1, y2 and y3. One can model these three outcome variables directly by regressing against time (independent variable) in both random and fixed effects. However, I wonder how I could approach a problem in which I have y1 - y2, y2-y3, and y3-y1. In this case I do not have access to direct measures (y1,y2 or y3), but pairwise changes over time (that I call "indirect"). Perhaps I can use the interval between y1-y2 and y3-y1 as both random and fixed effects, but with this approach the meaning of time is quite different.

So the question is: how would you organise your data frame for this scenario? How would you define time? My aim is to calculate annual changes with the mixed effects model for example.

• In "direct" model you check if measures change with time (time is your independent variable). What do you want to check in "indirect" model (what is your independent variable)? – Łukasz Deryło Jul 6 '17 at 10:02
• Thanks for your response. Let's assume independent variable is time with some other nuisance variables. So, in this example, we could assume that we are looking at annual changes. I have also edited question for future readers. – Arman Jul 6 '17 at 10:15
• So, what is y1-y2? Is it a difference between 1st and 2nd year? – Łukasz Deryło Jul 6 '17 at 10:21
• yes exactly, it is difference over an interval. – Arman Jul 6 '17 at 10:23
• I'd run repeated measures ANOVA to compare y1 - y2, y2-y3, and y3-y1, and see which changes differ significantly. – Łukasz Deryło Jul 6 '17 at 10:29