Hello,
I'm currently working on a dataset obtained from a periodical survey of the Bank of Italy (the SHIW). I would like to create a panel of individuals over a certain number of years. The problem is that I cannot create a unique identifier for the individual, because of what follows:
1) I have the following variables: NQUEST (household identifier numerical code), NORD (individual identifier numerical code inside the household), NORDP (individual identifier numerical code inside the household in the previous year), ANNO (year)
2) Basically what happens is that the household composition changes over time (a person could die, or a child could marry and form a new household for example), so that also the NORD variable changes.
I provide you a small sample, so that you can better understand (here what specifically happens is that NORD = 1 and NORD = 2 invert their codes in 2010):
nquest nord anno nordp
736917 1 2006 .
736917 1 2008 1
736917 1 2010 2
736917 1 2012 1
736917 1 2014 1
736917 1 2016 1
736917 2 2006 .
736917 2 2008 2
736917 2 2010 1
736917 2 2012 2
736917 2 2014 2
736917 2 2016 2
736917 3 2006 .
736917 3 2008 3
736917 3 2010 3
736917 3 2012 3
736917 3 2014 3
736917 3 2016 3
736917 4 2006 .
736917 4 2008 4
736917 4 2010 4
736917 4 2012 4
736917 4 2014 4
736917 4 2016 4
What I need is a unique_id variable for each individual of each household. Could you help me?
Thanks in advance!
I'm currently working on a dataset obtained from a periodical survey of the Bank of Italy (the SHIW). I would like to create a panel of individuals over a certain number of years. The problem is that I cannot create a unique identifier for the individual, because of what follows:
1) I have the following variables: NQUEST (household identifier numerical code), NORD (individual identifier numerical code inside the household), NORDP (individual identifier numerical code inside the household in the previous year), ANNO (year)
2) Basically what happens is that the household composition changes over time (a person could die, or a child could marry and form a new household for example), so that also the NORD variable changes.
I provide you a small sample, so that you can better understand (here what specifically happens is that NORD = 1 and NORD = 2 invert their codes in 2010):
nquest nord anno nordp
736917 1 2006 .
736917 1 2008 1
736917 1 2010 2
736917 1 2012 1
736917 1 2014 1
736917 1 2016 1
736917 2 2006 .
736917 2 2008 2
736917 2 2010 1
736917 2 2012 2
736917 2 2014 2
736917 2 2016 2
736917 3 2006 .
736917 3 2008 3
736917 3 2010 3
736917 3 2012 3
736917 3 2014 3
736917 3 2016 3
736917 4 2006 .
736917 4 2008 4
736917 4 2010 4
736917 4 2012 4
736917 4 2014 4
736917 4 2016 4
What I need is a unique_id variable for each individual of each household. Could you help me?
Thanks in advance!
Comment