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
Related Posts with Rank individual with characteristic A against members with characteristic B
Fractional Dynamic ProbitHello all, for my master thesis on bank's NPL, after having estimated the determinants of bad loan w…
Generate a variable with the count of the value 3 across several variablesHi, I would like to generate a variable that contains the count of the value 3 across several column…
Optimize by minimizing the value of an equation to get a parameter value for each observationDear Everyone, Software Used: STATA 15.1 I am trying to get a parameter value (R) for each observa…
GMM Xtabond2Hi friends, This is my first experience for GMM. help me, please. I should examine the relationshi…
Multiplicative interaction with a continuous outcomeHi, I am fitting a model with a continuous outcome and an interaction between two binary predictors…
Subscribe to:
Post Comments (Atom)
0 Response to Rank individual with characteristic A against members with characteristic B
Post a Comment