Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: xtiles....


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: xtiles....
Date   Sun, 29 Sep 2002 11:31:40 +0100

Donna Vallone
>
> I've divided income and wealth variables into 5 equal
> quantiles using
> the xtile function, however, when I ask STATA to divide my education
> variable into 5 quantiles, it only gives me four values.
> The education
> variable is a continuous variable ranging from 1 through
> 17.  Any ideas
> why it's not working?
>

Crosstabulate input and output.

. tab education <whatever>

You will see, I guess, that this is a side-effect
of tied values, given that the same input must map
to the same output.

With the auto data,

. xtile xrep78 = rep78, nq(5)

gives just 3 distinct quantiles, even
though there are 5 distinct (non-missing
values).

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index