Hello everyone,
Im working with a dataset that includes 2 levels of data: individual level data and schools level data. I created school level variables using individual level observations. For example, i have something like this:
School_ID |
Ind_ID |
Math_score |
mean_school_math_score |
|
1 |
1 |
100 |
93.6 |
|
1 |
2 |
90 |
93.6 |
|
1 |
3 |
91 |
93.6 |
|
2 |
4 |
90 |
90.6 |
|
2 |
5 |
95 |
90.6 |
|
2 |
6 |
87 |
90.6 |
|
3 |
7 |
100 |
92 |
|
3 |
8 |
86 |
92 |
|
3 |
9 |
90 |
92 |
|
Now, i just need the school information variables, because i need to merge 5 datasets with information of different years, i created all the variables using egen. I think collapse can be helpful, but that means i have to create all the variables again(it is a lot of work). theres something i can do to get a table like this?
School_ID |
Mean_school_math_score |
1 |
93.6 |
2 |
90.6 |
3 |
92 |
Thank you very much, im sorry if my english is not very good.
0 Response to Multilevel data management
Post a Comment