I have a data set of 20 000 individuals, each with an income (posFinc_5yr ) and a number indicating which city they live in (fdested). I want to group all individuals into regions (there are 19 regions), to eventually find a measure of income inequality between the regions. Ultimately I want to find the P90/P10 ratio between the regions.
I first assigned the individuals into regions by using
recode fdested (min/0194=1)(0201/0240=2)(0301=3)(0401/0440=4)(0501/0580=5)(0601/0681=6)(0701/0798=7)(0801/0835=8)(0901/0990=9)(1001/1047=10)(1101/1160=11)(1201/1301=12)(1401/1449=14)(1501/1576=15)(1601/1665=16)(1701/1780=17)(1801/1874=18)(1901/1943=19)(2001/2030=20), gen(fdested_group)
Then I tried finding the inequality rato by using
ineqdec0 posFinc_5yr, by(fdested_group)
But I get an error message saying "no observations". What am I doing wrong?
Thanks in advance!
Nora
I first assigned the individuals into regions by using
recode fdested (min/0194=1)(0201/0240=2)(0301=3)(0401/0440=4)(0501/0580=5)(0601/0681=6)(0701/0798=7)(0801/0835=8)(0901/0990=9)(1001/1047=10)(1101/1160=11)(1201/1301=12)(1401/1449=14)(1501/1576=15)(1601/1665=16)(1701/1780=17)(1801/1874=18)(1901/1943=19)(2001/2030=20), gen(fdested_group)
Then I tried finding the inequality rato by using
ineqdec0 posFinc_5yr, by(fdested_group)
But I get an error message saying "no observations". What am I doing wrong?
Thanks in advance!
Nora
Comment