|Keywords:||father, mother, padre, madre, tutor, relationship, family structure|
|Explanation:||This code allows you to create an ID of the father and the mother of each individual. Additionally a variable with the ID of the tutor (if the parents are not in charge) is created. It requires the database <b>c_ls</b>|
** LOAD THE c_ls.dta data before running this code ** Father rename ls06 id_father replace id_father=-1 if id_father==51 label variable id_father "Identificator (ls) of the father" ** Mother rename ls07 id_mother replace id_mother=-1 if id_mother==51 label variable id_mother "Identificator (ls) of the mother" ** Tutor rename ls08 id_tutor gen nocare=id_tutor==52 recode id_tutor (99 51=.) replace nocare=. if id_tutor==. replace id_tutor=ls if id_tutor==52 // own id, since cares about itself label variable nocare "Child cares about itself (no tutor)" label variable id_tutor "Identificator (ls) of person that care about child"