[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: dummies for percentiles
--On Monday, August 12, 2002 2:33 -0400 Radu wrote:
No need to use egen, cut.
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.
* 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: