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: How to divide the sample into quintiles?


From   Stevie Kourama <[email protected]>
To   [email protected]
Subject   Re: st: How to divide the sample into quintiles?
Date   Wed, 10 Mar 2010 18:50:49 +0300

Nick,
What martin said makes sense since with quintiles say 1,2 3 4 5 for
Poorest Quintile; Poor, Rich and Richest one may wish to know the mean
net expenditure for each quintile. so when you Poorest quintile you
can also say their mean netexpe! I think that makes sense, unless I am
also out of context

I am working with the household budget survey and i wanted to use
netexpe of the household to divide them into quintiles, so i thought
it would have been interest to know each quintile stands at what mean!

Stevie

On Wed, Mar 10, 2010 at 6:35 PM, Nick Cox <[email protected]> wrote:
> Stevie's question seemed unclear to me. As the mean can be in general
> anywhere between the lowest value and the highest value, there is no
> automatic relation to quintiles.
>
> If Martin's answer is not what is wanted, more detail is needed.
>
> Nick
> [email protected]
>
> Martin Weiss
>
> " By the way, how do add the mean in this quintiles"
>
> Use -egen, mean()-:
>
> *************
> sysuse auto, clear
> xtile quant = mpg, nquantiles(5)
> bys quant: egen meaninsidequantile=mean(mpg)
> sort quant
> l mpg  meaninsidequantile quant, sepby(quant) h(20)
> *************
>
> Stevie Kourama
>
> Martin, I think the first command John gave was wrong, but the second
> that he gave works now.
>
> I am afraid describe netexp does not give much but
>
> xtile quintile=netexpe [w=weight], nq(5)
>
> creates the quintile variable
>
> with frequencies and percentages.
>
> By the way, how do add the mean in this quintiles
>
>
> *
> *   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/
>



-- 
Stevie Kourama

*
*   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