Let's say I have a hierarchical dataset with student scores (for each student) nested within schools. While modelling for a varying intercept, would it be okay to include the average of student scores within a school as an input variable while modelling the school-level intercept? Wouldn't this count as "data leakage"?
In some sense, I am using the dependent variable as an input to predict the dependent variable itself.