Monday, January 02, 2006

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: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?