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: generating a variable


From   "Rubil Ivica" <[email protected]>
To   <[email protected]>
Subject   st: generating a variable
Date   Tue, 13 Nov 2012 11:58:09 +0100

Dear Statalisters,

Here's my problem. I have a dataset with a number of individual-level observations. For each person, I have an identifier of the region (region_id) within (s)he lives in. I need to generate the following measure of upward relative income deprivation (rel_depr_up) for each person: the sum of differences between the person's income and incomes of all people with HIGHER income in the same region, divided by the total number of people in the region. Another measure I need is a measure of downward relative income satisfaction: the sum of differences between the person's income and incomes of all people with LOWER income in the same region, divided by the total number of people in the region. In addition, how to take into account individual weights in the calculation?

Thanks,
ir  




--
Ivica Rubil
Ekonomski institut || The Institute of Economics, Zagreb
Trg J. F. Kennedyja 7, 10 000 Zagreb, Croatia
tel. +385-1-2362-269 || fax. +385-1-2335-165
[email protected] || www.eizg.hr


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