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]

st: Re: How to generate quantile categories by group/varlist?


From   Alika Tuwo <[email protected]>
To   [email protected]
Subject   st: Re: How to generate quantile categories by group/varlist?
Date   Thu, 25 Oct 2012 12:13:40 +0700

Hi there,

I'm working on a national survey data and I'm trying to group
expenditure per capita according to provincial (NOT national)
quantiles.

prov - code for province (33 unique values)
ecp - expenditure per capita
weind - individual weight


If I were to group 'epc' by national quintiles I would use the command:

 xtile q_epc = epc [fweight = weind], nquantiles(5)

But what if I would like to generate quantile groups for each
province? Is there any quick way to do this?  The 'by' option wouldn't
work with 'xtile'. So far I've had to work on each province
separately. Thanks in advance for the help.


Best regards,

Alika
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index