The model follows the form of y = XB + Zϒ + ε, where y is the matrix of outcome variable, X is the matrix of predictor variables, Z is the design matrix, ϒ is the vector of random effects, and ε is the vector of residuals.

Now, we have to consider for the random effects. Consider to make the time points as the random effects. The reason is that we expect that the "outcome" within each time point may be correlated due to some effects such as treatment.

Is this the right way of thinking for choosing random effects?


1 Answer 1


To start with, we'd need a bit more information on your experimental design and what you exactly you mean by "time point". But it seems your suggestion is not the right way of thinking of random effects.

Random effects are there to model differences in your data that are due to the subjects or items you chose or to explain variance that is not due to the effect you're interested in. There are some more conceptual ideas behind what random effects are, but here are some rather straightforward ideas: You usually define variables as random effects when

  • you have drawn your subjects, items or cases randomly from a bigger population. Say you had 40 right-handed participants age 18-20 in your experiment, then you chose those people "randomly" from all the right-handed people age 18-20 that you could have chosen. Then your random effect would be participant: You look at your treatment effect by subject (as you expect there to be inter-individual differences you're not actually interested in but want to account for). Say you would have them look at pictures, the same would hold: You second random effect would (probably) be picture b/c you chose the pics "randomly" from a collection of many pictures and you would expect there to be some variance in you data merely due to the inter-individual differences within the pictures. Basically, you don't want the inter-individual differences to interfere with the effect you're actually interested in.
  • when your random effect has more levels in reality than actually occur in your data. Say in the experiment above you've noticed some sit closer to the screen than others and you measure the distance each time. Say among the 40 people you have a few sitting only 25cm from the screen, a few 60cm from it, and the rest 30-58cm from it. But no one sits 25.1-29cm, 58.1-59.9cm or 28,38,40,41cm from the screen. Then you don't have all possible levels of the effect distance from screen in your data while in reality, all your missing levels exist. When you have all levels, include distance as a fixed effect.

Conceptually, it also matters what your research question is. Sometimes it might make sense to take something as a fixed effect that would be a random effect (acc. to above) in theory.

This should be a starting point. There used to be great answer on here somewhere, but I can't find it right now. But you'll find more on this on this pages.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.