Hello Stata folks, I am working on a dataset that each school ID has 7 years of data capturing principal's ID. I need to count the number of distinct principal ID each school has had over the past seven years. But the data is not unique on school ID nor principal ID. Can anyone tell me how I should deal with it? Thanks!
for instance, my data looks like below (i only kept two years of data here as an example)
Code:
school principal_yr1 principal_yr2
1111 100888 117583
1111 100999 124853
1111 100888 283043
2222 113824 176392
3333 158345 483572
4444 189999 184257
4444 189999 184925
Thanks.
0 Response to count the number of distinct observations across variables
Post a Comment