Hi,

I need to identify by id who has the same grade repeated multiple times. I have used [_n] and [_n+1] to identify the grades that are the same consecutively, but am struggling to find who has the same grade repeated in any order. Some will have different levels repeated mutliple times. As always grateful for your help....

Carla


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float id long grade float yr
1 2 2010
1 3 2011
1 1    .
1 2 2012
2 4 2013
2 4 2014
2 5 2015
3 2 2010
3 3 2011
3 2 2012
3 6 2013
3 2 2014
3 3 2016
end
label values grade grade
label def grade 1 ".", modify
label def grade 2 "a", modify
label def grade 3 "b", modify
label def grade 4 "c", modify
label def grade 5 "d", modify
label def grade 6 "f", modify