Hello, I want to do multilevel analysis - and I have encountered a problem.
I want to do an analysis about happiness level of students in class 1 elite class,
BUT in my analysis, perception of class 2 students, non-elite students about elite education will be one of the predictor.
The perception about class 1 by class 2 will be made with the code:
egen group_perception=median(elite_perception) if class==2 bys(school)
as the group_perception variable was made by the students in class 2, when I tried to use it in the multilevel analysis, the error : no observation occurs - which is not very surprising considering that the group_perception variable was only made with the students in class 2 and I am running multilevel analysis with the students in class 1.
How would I be able to solve this problem? I am thinking about making just group-level variable with only the median value. Thanks.
I want to do an analysis about happiness level of students in class 1 elite class,
BUT in my analysis, perception of class 2 students, non-elite students about elite education will be one of the predictor.
The perception about class 1 by class 2 will be made with the code:
egen group_perception=median(elite_perception) if class==2 bys(school)
as the group_perception variable was made by the students in class 2, when I tried to use it in the multilevel analysis, the error : no observation occurs - which is not very surprising considering that the group_perception variable was only made with the students in class 2 and I am running multilevel analysis with the students in class 1.
How would I be able to solve this problem? I am thinking about making just group-level variable with only the median value. Thanks.
Comment