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, is already up and running.

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

Re: st: Yitzhaki index

From   "Frank Elgar, Dr." <>
To   "" <>
Subject   Re: st: Yitzhaki index
Date   Fri, 15 Mar 2013 22:13:40 +0000

Thank you Sandu, and more accurately Bill Gould, for this posting. I did
not find by searching 'Yatzhaki' but it is, in fact, the Yitzhaki index of
relative deprivation of individual affluence (FASt) in a reference group

sort schoolID FASt
gen sumdiff = .
st_view(schoolID=.,     ., "schoolID")
st_view(FASt=.,     ., "FASt")
st_view(sumdiff=.,     ., "sumdiff")
obs = panelsetup(schoolID, 1)
for (g=1; g<=rows(obs); g++) {
	for (i=obs[g,1]; i<=obs[g,2]; i++) {
			sum = 0
            for (j=obs[g,1]; j<=obs[g,2]; j++) {
                    if (FASt[j]>FASt[i]) sum = sum + (FASt[j]-FASt[i])
            sumdiff[i] = sum

bysort schoolID: gen Yitz=sumdiff/(_N-1)

Frank J Elgar
McGill University

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index