Hi all,
I could use some guidance on how to re-code and generate variables so that my data makes sense.At the moment I have a dataset that includes husbands and their spouses. They each have a unique ID and a household ID (includes the husband and spouse) - "indid" and "hhid".
I currently have these variables in the dataset:
Description: Individual's father live in same household. Variable name: q0113, q1101 (coded as 1 for yes and 2 for no)
Description: Individual's mother live in same household. Variable name: q0115, q1201 (coded as 1 for yes and 2 for no)
Using the variables q0113 and q1101 to identify if an individual’s father lives in the same household and q0115 and q1201 if an individual’s mother lives in the same household – I need to create a new variable called “livingstructure” such that:
I could use some guidance on how to re-code and generate variables so that my data makes sense.At the moment I have a dataset that includes husbands and their spouses. They each have a unique ID and a household ID (includes the husband and spouse) - "indid" and "hhid".
I currently have these variables in the dataset:
Description: Individual's father live in same household. Variable name: q0113, q1101 (coded as 1 for yes and 2 for no)
Description: Individual's mother live in same household. Variable name: q0115, q1201 (coded as 1 for yes and 2 for no)
Using the variables q0113 and q1101 to identify if an individual’s father lives in the same household and q0115 and q1201 if an individual’s mother lives in the same household – I need to create a new variable called “livingstructure” such that:
- If the Head records that his father and/or mother lives in the same household we code it as “1” for patrilineal.
- If the spouse record that her father and/or mother lives in the same household we code it as “2” for matrilineal.
- If both Head and spouse records mother/father as residing in the same household we code it as “3” for extended.
- If neither the Head or spouse record mother/father residing in the same household we code it as “4” for nuclear.
Comment