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: Yitzhaki index


From   "Frank Elgar, Dr." <frank.elgar@mcgill.ca>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Yitzhaki index
Date   Fri, 15 Mar 2013 11:24:13 +0000

Dear Statalist,

My dataset contains a group variable (schoolID) and affluence variable
(FAS).  I want to calculate Yitzhaki's (1979) index of relative
deprivation for each individual within schools, the reference group. The
Yitzhaki index is simply the average distance that separates the income of
each individual from all higher incomes in the group.  As such, feelings
of deprivation are based on upward comparisons.

It does not seem that complicated but I cannot sort out the syntax.

I have been tried things along the lines of

by schoolID, sort: egen totFAS=total(FAS)
by schoolID, sort: egen maxFAS=max(FAS)
by schoolID, sort: egen schoolsize=count(FAS)
by schoolID, sort: generate
yitz=(((total(FAS))-FAS)/schoolsize-1)-FAS)/(size-1)
by schoolID, sort: replace yitz=0 if FAS>=maxFAS

But this isn't even close. The distances must be based on all higher FAS
values within each schoolID. Any suggestions?


Frank J Elgar, PhD
McGill University


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