On Sat, 14 Mar 2009, [ISO-8859-1] Sebasti�n Goinheix wrote:
I need to calculate gini coefficient in two and more groups (for
example sex:1,2; region:1-5...). How can I do that?
If I understand your question right, you can do something like
<script>
smpl sex=1 --restrict
scalar gs1 = gini(y)
smpl sex=2 --restrict --replace
scalar gs2 = gini(y)
smpl --full
loop i=1..5
smpl region=i --restrict --replace
scalar gr$i = gini(y)
endloop
</script>
Allin Cottrell