Hi there, I am working with a database for which there is information on each individual and there is an identifier to identify couples. So there is mergeid which identifies the individual and coupleid which is the same for 2 individuals in the same couple (both are strings with numeric and non numeric data).
If I want for example to know the age of the individual and the age of their spouse could you suggest how I can do this? I can't figure out how to do it.
i can count those who are part of a couple or not, I've created a binary 1 or 0 variable for missing info in the coupleid column, but how can I find the age of their spouse? If doing this in excel I would use the lookup function.
Any help very gratefully received, I've attached a simple snapshot which will hopefully make clearer what I mean. Thank you.
mergeid mergeidp1_t coupleid1_t age
AT-000327-01 AT-000327-02 AT-000327-01-02 50
AT-000327-02 AT-000327-01 AT-000327-01-02 60
AT-001816-01 AT-001816-02 AT-001816-01-02 70
AT-001816-02 AT-001816-01 AT-001816-01-02 80
AT-002132-01 90
AT-002355-01 AT-002355-02 AT-002355-01-02 100
AT-002355-02 AT-002355-01 AT-002355-01-02 20
AT-004234-01 AT-004234-02 AT-004234-01-02 30
AT-004379-01 40