Hi everyone,
I am working on with a survey in which all adult members of the household participated individually. Now I want to generate a variable that captures the partner’s information (country of birth).
The dataset contains two identifiers: the personal identifier (pid) and the partner’s identifier (parid). The two correspond, so it is possible to link couples. There is also a household identifier (hid). In the example below, we have a couple living in the same household, with a German-born and a foreign-born partner (germborn).
When parid is missing, it means that the person does not have a partner.
I am not sure how I can generate a variable to capture the partner’s origin.
Thank you!
I am working on with a survey in which all adult members of the household participated individually. Now I want to generate a variable that captures the partner’s information (country of birth).
The dataset contains two identifiers: the personal identifier (pid) and the partner’s identifier (parid). The two correspond, so it is possible to link couples. There is also a household identifier (hid). In the example below, we have a couple living in the same household, with a German-born and a foreign-born partner (germborn).
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(pid parid hid) byte germborn 101 102 19 1 101 102 19 1 101 102 19 1 101 102 19 1 101 102 19 1 101 102 19 1 102 101 19 0 102 101 19 0 102 101 19 0 102 101 19 0 102 101 19 0 102 101 19 0
I am not sure how I can generate a variable to capture the partner’s origin.
Thank you!
Comment