I have data from household panel survey in a long form (several rows for one individual from different years) and I need to create unique ID for every respondent so I can set the data as panel data. Every respondent has variable household ID (hhid) and a personal within-household ID (pernum). Ideally, I would create variable personal ID as a combination of hhid and pernum. The problem is that respondent can have different pernum every year. The data also contain variable personal within-household ID in the last year (pernump). This is an example of how the dataset looks like:
Year | hhid | pernum | pernump |
2000 | 1 | 1 | 1 |
2000 | 1 | 2 | 3 |
2000 | 1 | 3 | 2 |
2001 | 1 | 1 | 2 |
Thank you for your help!
Dominika
0 Response to Panel data - linking individuals across years
Post a Comment