Hi all,
I've been searching around for a while without finding an answer to this, so I would be really grateful for any help!
I am analysing a nation-wide household survey which contains about 30,000 individual observations. The data has 500 PSUs (xhpsu), and within each
PSU, a number of households (xhnum) were sampled. The sample was also stratified (xstra).
. des xhpsu xhnum xstra
storage display value
variable name type format label variable label
--------------------------------------------------------------------------------------------
xhpsu int %8.0g psu
xhnum byte %8.0g household number
xstra int %8.0g XSTRA strata in the sample
. sum xhpsu xhnum xstra
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
xhpsu | 28769 1481.253 225.1336 1001 1800
xhnum | 28769 9.287254 5.263503 1 34
xstra | 28769 254.7213 63.50279 100 325
In browse view, the individual observations (household members) are like this:
xhpsu xhnum xstra
1001 11 100/moun
1001 1 100/moun
1001 16 100/moun
...
xhpsu xhnum xstra
1002 10 100/moun
1002 13 100/moun
1002 7 100/moun
...
xhpsu xhnum xstra
1003 17 100/moun
1003 16 100/moun
1003 7 100/moun
and so on.
How can I link each household member to a unique household ID using xhpsu, xhnum and xstra? The purpose of this would be to analyse characteristics for the household as a whole.
Thanks very much in advance for any help.
Magnus
I've been searching around for a while without finding an answer to this, so I would be really grateful for any help!
I am analysing a nation-wide household survey which contains about 30,000 individual observations. The data has 500 PSUs (xhpsu), and within each
PSU, a number of households (xhnum) were sampled. The sample was also stratified (xstra).
. des xhpsu xhnum xstra
storage display value
variable name type format label variable label
--------------------------------------------------------------------------------------------
xhpsu int %8.0g psu
xhnum byte %8.0g household number
xstra int %8.0g XSTRA strata in the sample
. sum xhpsu xhnum xstra
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
xhpsu | 28769 1481.253 225.1336 1001 1800
xhnum | 28769 9.287254 5.263503 1 34
xstra | 28769 254.7213 63.50279 100 325
In browse view, the individual observations (household members) are like this:
xhpsu xhnum xstra
1001 11 100/moun
1001 1 100/moun
1001 16 100/moun
...
xhpsu xhnum xstra
1002 10 100/moun
1002 13 100/moun
1002 7 100/moun
...
xhpsu xhnum xstra
1003 17 100/moun
1003 16 100/moun
1003 7 100/moun
and so on.
How can I link each household member to a unique household ID using xhpsu, xhnum and xstra? The purpose of this would be to analyse characteristics for the household as a whole.
Thanks very much in advance for any help.
Magnus
Comment