Dear all,
for my research, I am using IFLS data to look for the relationship between parental characteristics and educational outcome. I have a dataset that includes household id (hhid93), person id (pidlink), line number of hh member (ar001a), line number of birth father (ar10), line number of birth mother (ar11), and edu level of each member.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str7 hhid93 str9 pidlink byte(ar001a sex93 ar10 ar11 edu_level93)
"1571000" "157100001"  1 1  .  . 2
"1571000" "157100002"  2 0 16 17 2
"1571000" "157100003"  3 0  1  2 3
"1571000" "157100004"  4 0  1  2 2
"1571000" "157100005"  5 0  1  2 2
"1571000" "157100006"  6 0  1  2 2
"1571000" "157100007"  7 0  1  2 1
"1571000" "157100008"  8 1  1  2 1
"1571000" "157100009"  9 1  1  2 1
"1571000" "157100010" 10 1 16 17 7
"1571000" "157100011" 11 0  .  . 1
"1571000" "157100012" 12 1 10 11 4
"1571000" "157100013" 13 1 10 11 2
"1571000" "157100014" 14 1 10 11 2
"1571000" "157100015" 15 1 10 11 2
"1571000" "157100016" 16 1  .  . 2
"1571000" "157100017" 17 0  .  . 1
end
label values sex93 sex
label def sex 0 "0.F", modify
label def sex 1 "1.M", modify
I want to generate maternal and paternal edu variables. The problem is within the same household there are more than 1 family live in the house (in this case there are 3 parents). I have tried some strategies but always generate the education based on the edu of the head of hh member (number 1 in ar001a). Can you help me with this issue? Any helps is greatly appreciated. Thank you in advance.