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 student in class 1 will be one of the predictors.
The perception about class 1 by class 2 will be made with the code:
egen group_perception=median(perception) if class==2
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? Thanks.
Related Posts with How to make group-level variable?
Treatment covariate interactionsHi, I'm running a model in which I have a two-arm treatment and a covariate interaction. The model …
Creating all combinations of a series of numbers without repeatsHello Statalist, I want to create a variable in Stata that is all of the combinations, repetition, …
sorting issue with multiple imputationsHello, I use panel data that I have set via Code: mi xtset id survey With id being the identifi…
Interpreting two cross-level interaction effects at the same time in MLMHi Statalists, I am running a multilevel model which predicts individual-level public support for t…
Add row total to frequency table with asdocHi all, I am trying to Add the row total to a frequency tably when I am using asdoc, the original t…
Subscribe to:
Post Comments (Atom)
0 Response to How to make group-level variable?
Post a Comment