Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: xtile creating different deciles using same data


From   "Alvaro Herrera E." <[email protected]>
To   [email protected]
Subject   Re: st: xtile creating different deciles using same data
Date   Tue, 3 Jan 2012 09:43:28 -0300

Just checked, and it isn´t.

best,

Alvaro.


On 2 January 2012 22:01, Nick Cox <[email protected]> wrote:
> Back to the Stata question:
>
> Is -weight- also constant within households?
>
> Nick
>
> On Mon, Jan 2, 2012 at 8:23 PM, Cameron McIntosh <[email protected]> wrote:
>
>> A comment on the nature of your income variable, as this is not a trivial matter. Per capita income is indeed preferable to raw total household income but is still not optimal, for reasons discussed in:
>> Carson, J. (2002). Family spending power. Perspectives on Labour and Income, 3(10), 24-32.http://www.statcan.gc.ca/studies-etudes/75-001/archive/e-pdf/5018698-eng.pdf
>>
>> I would suggest weighting in the manner Carson suggests (or slightly differently if the context warrants), and see if this has an impact on the results.  Perhaps some of the OECD measures might be useful as well:
>>
>> http://www.oecd.org/document/51/0,3746,en_2649_33933_49147827_1_1_1_1,00.html
>
> From: [email protected]
>
>>> Hi, I am using the command xtile on stata 11, 32bits, to create income
>>> deciles on my database, but I found an inconsistency:
>>>
>>>
>>> I have a variable with the household per capita income, with data for the
>>> whole population. Then I create deciles, but I don't do it over the
>>> population, but households.
>>>
>>> To do so, I use only one observation per household (they all share the
>>> same household per capita income) to create my deciles, and then I assign
>>> the rest of the household members to the decile of such observations.
>>> Of course, as poorer families tend to be larger, I end up with deciles that
>>> have more than 10% of the population on the lower end of the distribution,
>>> and others with less than 10% on the other end. That's fine with me.
>>>
>>> basically, what I do is
>>> xtile decaux==income if count==1 [w=weight], nq(10)       where
>>> count==1 is the first member-chosen randomly- of each household, and
>>> then
>>> recode decaux .=0
>>> by id_househ: egen decile=sum(decaux)                          I
>>> assign the other members of each household to the deciles of their
>>> respective members (count==1)
>>>
>>>
>>> The problem is that  if I run the same commands on the same database for a
>>> second time (or a third, or fourth, always without modifying the data),
>>> then the number of observations assigned to each decile differs every time.
>>>
>>> The overall population does not change, but the population assigned to the
>>> deciles changes marginally every time.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



-- 
______________
Alvaro Herrera E.
Phd (C) in Economics
University of Sussex
UNITED KINGDOM

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index