This might be a basic question, but I struggle to find a clear answer to this online.
Let's assume I am measuring heart rate under different activities such as running, walking, and resting. I have made these measurements on 100 different people, and for each individual, I have 20 measurements per activity. That means I have 100 x 20 (measurements) x 3 (activities) observations. I am of course interested in the effect of activity on heart rate.
My usual inclination would be to fit a general linear model like this:
HR ~ Act + Person
I would include the Person variable as a dummy to account for differences between individuals that affect heart rates, such as fitness and age. However, I could also fit a mixed effects model like this:
HR ~ Act + (1|Person)
In the second case, I am fitting one fixed intercept plus 100 random intercepts, one for each individual. In the first case, I am fitting one intercept for individual 1 plus 99 dummies for all the other individuals. It would expect the second approach to be superior, but I can't quite put into words what the difference would be. I am not very familiar with mixed models, so if I am making a mistake in the specification of the model, please let me know.