I have two 3 IDs (Personal ID, Partner ID and Houshold ID), which I know generated for every person in a unique way. Now I want to assign the same Partner ID for both partners and the same Houshold IDs for every person living in the same houshold. This should be based on specific variables.
Now I would really appreciate your help for the following:
The participants are asked if their partner participates in the survey (yes/no). If "yes" is chosen, participants are asked to fill in the first and last name (first_name_p, last_name_p). Can I match the IDs with an If clause in this case? I want to say "If first_name_p = first_name (of any another participant) AND last_name_p = last_name (of another participant) = same ID.
So basically I would like to know how to refer to all other observations in an if-clause.
I hope this is understandable. I appreciate any help!! Thanks!