Re: Decile Share using Wealth Index Factor by Urban and Rural (Stata) [message #2525 is a reply to message #2523] |
Mon, 07 July 2014 13:01 |
Reduced-For(u)m
Messages: 292 Registered: March 2013
|
Senior Member |
|
|
This will work better if you want just one variable with both deciles in it - that is, you will have one variable that is "wealth decile" that will have different cut-offs for rural/urban:
egen wealth_decile = xtile(hv271), by(residence) nq(10)
This makes a bit more sense if you want to use the deciles as dummy variables in a regression context, because the code that you have will generate "missing" values for decile_urban for rural residents (and vice versa).
*Note: you may need to install the "egenmore" package - type "findit egenmore" in your stata terminal to get a link, or "ssc install egenmore" to directly install that.
|
|
|