Dear List, I am unsure if this is specifically a R question or a stats question? I thought i would ask here and if i get no replies it will answer that!
I am trying to calculate Gini coefficients in R, based on a slight modification of the typical equation that i have seen in a paper.
PastedGraphic-2.pdf
Description: Adobe PDF document
where X is the cumulated proportion of Cars and Y is the cumulated proportion of People. The value k indexes from the first to the next to last (n-1). So i have a rough idea of how to implement this in R however i am unsure how the data should be sorted. Typically when i have calculated Gini coefficients in the past i have sorted "X" into ascending order then calculated the cumulative proportion from this. However if i have two factors X + Y i am unsure how to sort the data? I.E do i sort x and expand the section and also sort y based on the sorting of X, or do i sort X calculate the coefficient then sort Y and calculate coefficient and add them together? Once again i am sorry if this is completely the wrong place to ask such a question. Peter
______________________________________________ R-help@r-project.org 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.