Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: xtile command; Stata 10


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: xtile command; Stata 10
Date   Wed, 27 Apr 2011 15:59:56 +0100

Various tables and plots 

. tab DSO quintileDSO 

. scatter quintileDSO DSO 

. quantile DSO, ms(none) mla(quintileDSO) mlabpos(0)

should help you see what you are doing. 

The command -xtile- should be documented thus: 

"This command can help you throw away quantitative information when for some perverse reason that is what you want to do."  

Nick 
n.j.cox@durham.ac.uk 

David Muller

Chances are your original variable contains many ties.

On Thu, Apr 28, 2011 at 12:08 AM, pouya_e <pouya_e@hotmail.com> wrote:

> I cannot find out why the xtile command in Stata does not give me
> approximately equal number of observations for each quantile :
>
>
> . xtile quintileDSO=DSO, n(5)
>
> .
> . ta quintileDSO
>
> 5 quantiles |
>     of DSO |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>          1 |        427       21.58       21.58
>          2 |        401       20.26       41.84
>          3 |        385       19.45       61.29
>          4 |        455       22.99       84.28
>          5 |        311       15.72      100.00
> ------------+-----------------------------------
>      Total |      1,979      100.00
>

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index