I have a data.frame in which the health outcome was collected from students at different schools (the individuals were aggregated at school level). The air pollution concentrations in the data was predicted at school level (the students within one school have the same value of air pollution). To analyse the effect of air pollution on individual health outcomes. I build a model using lme4 packages like this:


I know this model is right when air pollution exposure was different for students in one school. However, under the situation when the exposure was the same within group, is this model appropriate? I wonder if the include of random effect term might produce false negative results. In my opinion, the random term means the additional adjust of schools in the model in some way (might be wrong). Thanks for your help.


1 Answer 1


The inclusion of random intercepts for schools is one way to control for the non-independence of observations within each school. That is, the outcomes in any particular school may be more similar to each other than to outcomes in different schools. Whether or not the main exposure varies within or between schools does not matter. If the covariates all also vary only between schools, then any predictions / inferences are going to be the same for all students in the same school.

  • $\begingroup$ Really appreciate for your answer. I found that the include of the random term could dramatically increase the standard error (SE) of the parameter of exposure if it is the same within school. However, when I assign different simulated values on students within one school, the SE was much smaller. As you can see, the larger SE would tend to suggest an insignificant estimate, so it bothers me if the algorithm of random effect was appropriate for this situation after seeing the obvious change of SE. $\endgroup$
    – Bender
    Commented Dec 17, 2020 at 18:47
  • 1
    $\begingroup$ The random intercept is appropriate and this behavior should be expected. When the value is the same for all students in a school, then that variable is being measured at the school level, not the student level. Thus your sample size for the parameter estimate is equivalent to the sample size of schools, a smaller number than the number of students. If all else is equal, a smaller sample will lead to larger standard errors. $\endgroup$
    – Erik Ruzek
    Commented Dec 29, 2020 at 21:08

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.