# Analysis of the Residuals vs Fitted

I have a model for which I gathered 10 observations from each person, a total of 25 people, then 250 observations.

Well, this is part of my summary of the model,

> summary(m)

Call:
lm(formula = fmla, data = mydata)

Residuals:
Min      1Q  Median      3Q     Max
-9.3311 -3.8480 -0.3134  3.3273 13.4413

Residual standard error: 5.246 on 216 degrees of freedom
Multiple R-squared:  0.7702,    Adjusted R-squared:  0.7351
F-statistic: 21.94 on 33 and 216 DF,  p-value: < 2.2e-16


Looking at this results may seem that the model is pretty significant, but when I plot the Residuals vs Fitted I get this plot,

Which suggests me that there is a pattern in the plot. I figure this is about the 10 observations for each person. Can anyone help me analyse this plot?

• You have repeated measures, which means you should use a mixed effects model. The pattern in your plot strongly suggests that you need to account for the repeated measures as there are 10 points on each of these "lines". Mar 11, 2014 at 14:29
• I never had heard of mixed effects models. I'll give it a search. Thank you. Mar 11, 2014 at 14:31

Note that within each diagonal band, the residual decreases by one unit for every one unit the fitted value increases. This looks to me like the response for a given subject remains relatively constant and the predictors change a little bit between observations. Thus when the change in predictors predict a unit increase in mean response (fitted value) and the observed response remains the same, the residual for that observation decreases by one unit.

Because you have multiple observations from each subject, your data exhibits clustering, and you should use a method that handles clustered data if you wish to keep all of your observations as-is. However, if your predictors are indeed less stable or more prone to measurement error than your response, you might think about regressing the mean response on the mean predictor values per subject, or some similar procedure.

• Thank you for your answer. I've thought about that. As I had a little group of subjects available I took 10 measures from each one. This because I have 23 predictors. Mar 11, 2014 at 14:37