Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: generating a variable


From   "Rubil Ivica" <irubil@eizg.hr>
To   <statalist@hsphsun2.harvard.edu>
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
irubil@eizg.hr || 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index