Hello everybody!

I.m trying to calculate the Kolm–Pollack Index of inequality for the distribution of income, which is defined as:
Array
where yi is the level of income for the i-th person, y-bar is its mean for the sample which consists of n individuals and the parameter 𝛼 represents the level of inequality aversion, which is determined by the analyst. Unfortunately, I haven't found any user-written command for the calculation of this index. How can I do this with code? I think that it's probably not that difficult, but since I'm a novice in stata coding, I'd like to be sure about the code.

Really appreciate all the help I can get.

Thanos.