Hi,
I am unsure of how to write code for the following situation. I have a data set of students nested in classes. I would like to rank each male student in each class against the female students in the class (but not against all the students in the class). I would like to rank them using "math score". In other words, in Class A, I want to rank Bob's math score against Allie, Kim, and Sally but not against, say, Sam and Joe. I would like to loop through the entire dataset and do this for each male student.
I am using Stata version 15.1 on Windows 10.
Best wishes and many thanks in advance,
Prashant Loyalka
Assistant Professor
Stanford University
0 Response to Rank individual with characteristic A against members with characteristic B
Post a Comment