Can someone please explain the intuition behind mixed models in a nutshell? Whenever I read explanations, I get overwhelmed by notation and mathematical jargon. Can someone give me a simple example or motivation to help me understand the concept in a deeper way?
-
I like the explanation given on pages 3 to 8 of "Mixed-Effects Models in S and S-plus" by Pinheiro and Bates. – mark999 Apr 07 '13 at 07:15
-
1Of possible interest: [What is the difference between fixed effect, random effect and mixed effect models?](http://stats.stackexchange.com/q/4700/930) – chl Apr 07 '13 at 08:29
2 Answers
Here is my effort at this - imperfect, but might help.
Mixed effects models are needed when the variation in the response variable cannot be simply allocated between just a structural part and a residual individual randomness. Mixed effects models have both of these things but there is also randomness that is associated not just with individuals but groups.
The classic example is students' performance. There is a (big) element of random variation at the individual level. But each school can also be seen as contributing a common random element to the performance of each of the individuals at that school. One particular school may, for random reasons (lucky to have good teachers, etc) have high scores. Hence those students' randomness cannot be treated as independent of eachother - breaking many of the assumptions of more traditional models.
This concept can be extended beyond the simple residual randomness to also apply to random variation at the group level in the various parameters in the model (slopes, etc).
Taken altogether, the mixed effects model then can not only avoid pitfalls in traditional models when their i.i.d. assumptions are violated; they can provide powerful techniques to identify how much randomness is based at different levels.
The easiest to understand mixed effects models are those where the different sources of randomness are in a hierarchy (eg individuals-classes-schools). However, they can be extended beyond this to non hierarchical groupings. For example individual students could be grouped by their maths teacher and by their physics teacher, which may not have a simple relationship. But it would still be possible to estimate the individual randomness for each student (ie the individual residual) as well as a common effect for all the students of Mr A's maths students and another one for all of Ms B's physics students. (I am assuming that the response variable is some test of overall academic achievement that is shared by all these students, of course).
So what makes it "mixed"? Mixed means the model mixes structural and random components. In a way, traditional models are already mixed - they have a structural component, and individual randomness. Just by historical accident of nomenclature, models are only called mixed when they also have at least one more random component in additional to the individual level.

- 16,522
- 1
- 44
- 82
I will provide a short response that I believe will be helpful, but won't be detailed.
I make use of mixed effects models (i.e. models with both fixed and random effects) when I believe the error in my data is not from a single source, and when I have information that could identify alternate sources. Mixed models are often used when data are hierarchically structured. For example, students in classrooms. No doubt there will be error in measurement for each student, and it might be well modeled as a normal distribution. However, there may be additional error that is explained by the classroom in which the student learns (perhaps due to teachers/subject matter/text book). Thus, it might be important to have an additional error term to capture error due to classroom. That is to say a single error term to model a single source for individual measurement error may not appropriately capture error that is coming from a higher level source. Thus, to model the data properly, it may be necessary to partition the error due to students and error due to classrooms separately. The resulting fitted model will be a better fit to the data and ought to reduce bias in other model parameters.
Mixed models can do a whole lot more, though. I won't go into those details because I think the above is what you're looking for at the moment.

- 1,260
- 8
- 21