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
Cumulative returns for 1, 2, and 3 year periods using monthly price dataHi all, Could you please advise me how to generate cumulative returns for 1-, 2-, 3-year periods us…
State level panel data, federal level variableI am studying the influence of wind energy on residential electricity price. Panel data set 2000-201…
Flipping tables using eststo.Hi, I have a question concerning the construction of tables using eststo and esttab and posting them…
Goodness-of-fit measure, mixed-effects GLM, meglmDear all, I have a little question with respect to the output of my regression below. I ran a mixed…
how to run a quantile regression for estimating panel data models using instrumental variable?Hi I am working on an economic problem using the quantile regression model of panel data. I need to …
Subscribe to:
Post Comments (Atom)
0 Response to Rank individual with characteristic A against members with characteristic B
Post a Comment