# st: Question about cumulative density (cumul, xtile) -- quintiles and poverty status are not in sync. What am I doing wrong?

 From Anna Gueorguieva To statalist@hsphsun2.harvard.edu Subject st: Question about cumulative density (cumul, xtile) -- quintiles and poverty status are not in sync. What am I doing wrong? Date Thu, 2 Aug 2007 16:03:57 -0700 (PDT)

```Dear all,
I searched on this and was not able to locate anything. Thank you in advance for your time.

My quintiles and poverty status do not seem to be in sync and I have no idea what is going on!!

I generate my indicator for poor as having consumption per adult equivalent below the poverty line.
gen poor=real_totc_per_ae<=povline_m

Then I generate my quintiles by creating a cumulative distribution of consumption (in each survey wave)
I use xtile and then double check it with the cumulative density.

foreach x of numlist 1/4{
xtile quint`x'= real_totc_per_ae [pw=postpweight] if wave==`x',nq(5)
}
gen quint=quint1
foreach x of numlist 1/4{
replace quint=quint`x' if wave==`x'
}

bys wave: cumul real_totc [aweight=postpweight], gen(cumdens)

*check quints
replace quint=1 if cumdens<=.2
replace quint=2 if cumdens>.2&cumdens<=.4
replace quint=3 if cumdens>.4&cumdens<=.6
replace quint=4 if cumdens>.6&cumdens<=.8
replace quint=5 if cumdens>.8&cumdens~=.
And the problem is below -- it is not possible that there are poor people in quintile 3!!!! :
tab quint poor [aw=postpweight] if wave==2, col nof
Quintile |
of |
national |
distributi |         poor
on |         0          1 |     Total
-----------+----------------------+----------
1 |      0.00      45.96 |     19.98
2 |      0.40      45.44 |     19.98
3 |     28.81       8.61 |     20.03
4 |     35.19       0.00 |     19.89
5 |     35.60       0.00 |     20.12
-----------+----------------------+----------
Total |    100.00     100.00 |    100.00

And xtile2 gives me an error:
xtile2 newquint=real_totc_per_ae [pw=postpweight] ,nq(5) by(wave)
r(198);

Your ideas will be greatly appreciated.
Thanks a bunch!
Best,
Anna

____________________________________________________________________________________
Luggage? GPS? Comic books?