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
Calculating intra-class correlation from multilevel parametric survival modelHi Statalist, I'm hoping to calculate the intraclass correlation (with confidence intervals) from a…
Correct Regression Methodlogy for Panel Data SetHi all, I currently have a panel data set for home-sharing listings from 2014-2021 for each month (…
Calculating averages over a time-seriesHello, I am looking for a function to calculate the average unemployment rate (mean) over two sets …
Different Results When Running IV RegressionHi all, This is my 3rd post so far on this topic and I am so lost. Thank you guys so much for havin…
Rounding off district centroid gps coordinates to match rainfall data gps coordinatesHello, I have a question about rounding district centroid coordinate variables so I can merge it wi…
Subscribe to:
Post Comments (Atom)
0 Response to Rank individual with characteristic A against members with characteristic B
Post a Comment