Good morning,

I am working with data from students (level 1) belonging to classes (level 2) within schools (level 3). Within level 2 I have a variable on the teaching method of the teachers of that class that I want to use as a dependent variable to see what factors affect the teacher's decision to act in one way or another. I am interested in assessing whether the characteristics of the students in the classroom and those of the school (level 1 and level 3) affect him/her to decide that teaching method.

I have doubts as to how I should proceed. The following comes to mind:

1. Create aggregate variables that represent the mean of the value of the level 1 variables in the classroom. That is, each teacher will be assigned an average value for the level 1 variables depending on what the students in his or her class have answered. The doubt that arises is that as the average may involve problems (extreme values) I do not know if this method is correct and if there are other alternatives.

Thanks and best regards,

Nerea.