I was thinking through a possible data scenario. It is made up, so maybe my question doesn't make sense.
1) A statistical test of whether the proportion of "indicator" in "avgscore1ranktop25 == 1" is the same as in "avgscore2ranktop25 == 1" regardless of "id".
2) A statistical test of whether the same "id" inclusion in "avgscore1ranktop25" is the same as "avgscore2ranktop25".
Code:
clear all set obs 100 g id = _n g indicator = uniform() < .3 g avgscore1 = runiformint(0, 100) g avgscore2 = runiformint(0, 100) egen avgscore1rank = rank(-avgscore1) egen avgscore2rank = rank(-avgscore2) g avgscore1ranktop25 = avgscore1rank <= 25 g avgscore2ranktop25 = avgscore2rank <= 25
2) A statistical test of whether the same "id" inclusion in "avgscore1ranktop25" is the same as "avgscore2ranktop25".
Comment