May you advise, for each "personid", create a new variable which identifies "place2_type" with the highest frequency "sum_place2_type".


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long personid str7 fin_year byte nm_lpt long place2_type float(seq_place2_type sum_place2_type)
 2337 "FY10/11" 1 5 1 2
 2337 "FY11/12" 1 5 2 2
 2337 "FY11/12" 0 . . .
 2337 "FY12/13" 0 . . .
 3172 "FY09/10" 1 5 1 1
 3172 "FY10/11" 1 8 1 3
 3172 "FY11/12" 1 8 2 3
 3172 "FY12/13" 1 8 3 3
 3172 "FY09/10" 0 . . .
 3172 "FY09/10" 0 . . .
 3172 "FY09/10" 0 . . .
 3172 "FY09/10" 0 . . .
 3172 "FY10/11" 0 . . .
 3172 "FY10/11" 0 . . .
 3172 "FY10/11" 0 . . .
 3172 "FY10/11" 0 . . .
 3172 "FY13/14" 0 . . .
 3653 "FY07/08" 1 4 1 6
 3653 "FY08/09" 1 4 2 6
 3653 "FY09/10" 1 4 3 6
 3653 "FY10/11" 1 4 4 6
 3653 "FY11/12" 1 4 5 6
 3653 "FY12/13" 1 4 6 6
 3653 "FY13/14" 0 . . .
 5625 "FY11/12" 1 5 1 2
 5625 "FY12/13" 1 5 2 2
 5625 "FY08/09" 0 . . .
 5625 "FY08/09" 0 . . .
 5625 "FY09/10" 0 . . .
 5625 "FY09/10" 0 . . .
 5625 "FY10/11" 0 . . .
 5625 "FY10/11" 0 . . .
10045 "FY07/08" 1 4 1 5
10045 "FY08/09" 1 4 2 5
10045 "FY09/10" 1 4 3 5
10045 "FY10/11" 1 4 4 5
10045 "FY11/12" 1 4 5 5
10045 "FY12/13" 1 5 1 1
10045 "FY13/14" 0 . . .
11758 "FY12/13" 1 8 1 2
11758 "FY13/14" 1 8 2 2
11758 "FY10/11" 0 . . .
11758 "FY11/12" 0 . . .
11758 "FY11/12" 0 . . .
11758 "FY11/12" 0 . . .
14193 "FY10/11" 1 5 1 4
14193 "FY11/12" 1 5 2 4
14193 "FY12/13" 1 5 3 4
14193 "FY13/14" 1 5 4 4
17206 "FY11/12" 1 5 1 2
17206 "FY12/13" 1 5 2 2
17206 "FY07/08" 0 . . .
17206 "FY09/10" 0 . . .
17206 "FY10/11" 0 . . .
17206 "FY10/11" 0 . . .
17206 "FY10/11" 0 . . .
17206 "FY10/11" 0 . . .
17206 "FY11/12" 0 . . .
17206 "FY13/14" 0 . . .
17353 "FY11/12" 1 4 1 3
17353 "FY12/13" 1 4 2 3
17353 "FY13/14" 1 4 3 3
17353 "FY10/11" 1 8 1 1
17353 "FY07/08" 0 . . .
17353 "FY08/09" 0 . . .
17353 "FY08/09" 0 . . .
17353 "FY08/09" 0 . . .
17353 "FY08/09" 0 . . .
17353 "FY08/09" 0 . . .
17353 "FY09/10" 0 . . .
17353 "FY14/15" 0 . . .
19252 "FY14/15" 1 3 1 4
19252 "FY15/16" 1 3 2 4
19252 "FY16/17" 1 3 3 4
19252 "FY17/18" 1 3 4 4
19252 "FY11/12" 1 5 1 1
19252 "FY09/10" 0 . . .
19252 "FY10/11" 0 . . .
19252 "FY10/11" 0 . . .
19252 "FY11/12" 0 . . .
19252 "FY11/12" 0 . . .
19252 "FY12/13" 0 . . .
19252 "FY13/14" 0 . . .
19949 "FY12/13" 1 5 1 1
19949 "FY07/08" 0 . . .
19949 "FY08/09" 0 . . .
19949 "FY08/09" 0 . . .
19949 "FY08/09" 0 . . .
19949 "FY09/10" 0 . . .
19949 "FY10/11" 0 . . .
19949 "FY10/11" 0 . . .
19949 "FY10/11" 0 . . .
19949 "FY11/12" 0 . . .
19949 "FY11/12" 0 . . .
19949 "FY11/12" 0 . . .
22038 "FY12/13" 1 5 1 2
22038 "FY13/14" 1 5 2 2
22038 "FY07/08" 0 . . .
22038 "FY10/11" 0 . . .
22038 "FY11/12" 0 . . .
end
label values place2_type place2_type
label def place2_type 3 "HBC_General", modify
label def place2_type 4 "HBC_Complex/Intensive", modify
label def place2_type 5 "Kinship", modify
label def place2_type 8 "Residential", modify