# Linear model for repeated-measures regression

I have two independent variables $$y_{mi},z_{mi}$$ ($$z$$ is measured in fasting, so it is the basal state), measured with two different methods $$m$$ (m=2 is the reference method) in the same subjects $$i$$, with two predictors (age and sex). One regression model is needed for each variable, and the question is how age, sex, and first-method value influence the differences between methods.

What approach would be recommendable?

• A linear model (lm) in which $$y_{1i}-y_{2i}$$ is the independent variable, and age, sex and $$y_{1i}$$ is a predictor. The caveats are: A mixed model is recommended for paired-measures data; the residuals~fitted plot reveals a small amount of homocedasticity (a linear model of (abs(residuals)~fitted.values has a slope of 0.1). A linear model of $$residuals = f(age+sex+y_{1i})$$ reveals no association between the residuals and the predictors (Gauss Markov requirement).

• A robust regression (ltsreg/lmrob) with the same model.

• A mixed model (lme4) in which $$y_{1i}-y_{2i}$$ is the independent variable; age, sex and $$y_{1i}$$ are fixed effects and $$y_{1i}$$ is a random effect. The obtained coefficients are identical to those in the linear model! (I included $$y_{1i}$$ as a fixed effect because it's the most relevant predictor and we need its coefficient).

The results/coefficients obtained with the different methods are roughly equivalent.

My questions are:

• Would using the differences as dependent variable and one of the values as a predictor confront the Gauss-Markov theorem? Is this worrying, considering all the models give roughly similar estimates?

• I think I'm going to choose the easily-understandable linear model as the "solution" to this problem. Any suggestion/criticism?

Help is appreciated, thank you.

• If you work with the differences $$y_{1i} - y_{2i}$$ you have univariate data, i.e., a single difference per subject. Hence, you would not need to work with a mixed model unless I missed something.
• A potential benefit of working with a mixed model approach is if you have missing data for some subjects (i.e., you either have $$y_{1i}$$ or $$y_{2i}$$ but not both). In this case, you cannot compute differences for these subjects, but you could use all available data in a mixed model approach. For example, $$y_{mi} = \beta_0 + \beta_1 \texttt{Method}_{mi} + \beta_2 \texttt{Age}_i + \beta_3 \texttt{Sex}_i + b_i + \varepsilon_{mi},$$ where $$\texttt{Method}_{mi}$$ is zero for Method 2 and one for Method 1, and $$b_i$$ is a random intercept for the subjects with mean zero and variance $$\sigma_b^2$$. The coefficient $$\beta_1$$ will denote the difference in the expected outcome $$y_i$$ between the two methods controlled for age and sex.