[R] Gini coefficient in R

From: MICHELE DE MEO <micheledemeo_at_gmail.com>
Date: Mon, 11 Jun 2007 16:13:36 +0200


If I use the Ineq library and the Gini function in this way:

>Gini(c(100,0,0,0))

I obtain the result 0.75 instead of 1 (that is the perfect inequality).

I think Gini's formula in Ineq is based on a formula as reported here: http://mathworld.wolfram.com/GiniCoefficient.html

but in the case of perfect inequality:

x_1=.......=x_n-1 =0

x_n>0

these formula are equal to 1 - 1/n, not to 1.

....I don't know where I'm wrong....

-- 
Michele De Meo
http://micheledemeo.blogspot.com/

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 11 Jun 2007 - 14:19:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 11 Jun 2007 - 15:31:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.