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
Abadi's semi-parametric DiD Estimator - Sample characteristicsHi Statalist, I am currently working on dataset using a DiD approach to test the effect of a treatm…
Invalid name errorHi I am trying to run a quantile regression and then plot the ols and quantile regression coefficie…
New version of parmest on SSCThanks as always to Kit Baum, a new version of the parmest package is now available for download fro…
Foreach Loop for CAPM regressionHey there, i am trying to do CAPM regressions with daily stock returns for every company over a per…
New version of bmjcip on SSCThanks once again to Kit Baum, a new version of the bmjcip package is now availabel for download on …
Subscribe to:
Post Comments (Atom)
0 Response to Rank individual with characteristic A against members with characteristic B
Post a Comment