[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: egenmore xtile
Forwarded on behalf of Sara Hussain.
I would be grateful for advice on the xtile function. I have created a categorical variable denoting quintile group membership by region:
egen quin=xtile(income), by region nq(5) weight(wght)
I would like to know how I can create a variable that includes a percentile value eg lowest quintle using weights. I tried the folllowing but weights were not allowed:
by region: egen lquint=pctile(income), p(20)
Can xtile be modified for this?
Also, please could anyone suggest a command incorporating weights to create a mean variable for each group (in my case, region)?
* For searches and help try: