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

st: Re: dummies for percentiles

From   baum <>
Subject   st: Re: dummies for percentiles
Date   Mon, 12 Aug 2002 07:59:37 -0400

--On Monday, August 12, 2002 2:33 -0400 Radu  wrote:

Dear all,

Thanks for the previous help.
I have an income variable and I would like to create a set of dummies for
whether the income is between certain percentiles (i.e inc10 for income
b/w the 10th and 15th percentile and so on). I know that -centile-
generates requested centiles, but I'm not sure how to put the results of
this command into a list that can be used with the -egen cut- command.

No need to use egen, cut.

* create integer variable marking decile
xtile pct = income, n(10)
tab pct, gen(iq)

This will create dummies for the deciles of income. If you want every 5th percentile, use n(20), etc.


* For searches and help try:

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