Hello everyone,
I am currently developing a social security module that calculates benefit entitlements for individuals. It is mostly an arithmetic procedure that uses household cross-sectional data. Some of the benefits that I am modelling require spouse information, which means I must access the information stored in a different observation. I have two variables for IDs that allow me to do this (pid = personal ID and partner_id = partner ID). The value of partner ID is equal to the pid of the corresponding partner. Now to access this info I could subset my data, rename variables and merge, however, I was wondering if there is any way to access the values directly through the link, i.e. access the value of a variable from a different observation based on the link partner_id pid.
Thank you in advance for any help provided on solving this issue.
I am currently developing a social security module that calculates benefit entitlements for individuals. It is mostly an arithmetic procedure that uses household cross-sectional data. Some of the benefits that I am modelling require spouse information, which means I must access the information stored in a different observation. I have two variables for IDs that allow me to do this (pid = personal ID and partner_id = partner ID). The value of partner ID is equal to the pid of the corresponding partner. Now to access this info I could subset my data, rename variables and merge, however, I was wondering if there is any way to access the values directly through the link, i.e. access the value of a variable from a different observation based on the link partner_id pid.
Thank you in advance for any help provided on solving this issue.
Comment