Last week, in our Inequality course, we’ve been looking at data. We started with some simulated data, only a few of them
> library("ineq") > load(url("http://freakonometrics.free.fr/income_5.RData")) > (income=sort(income)) [1] 19233 23707 53297 61667 218662
How could we say that there is inequality in this sample? If we look at the wealth owned by the poorest, the poorest person (1 out of 5) owns 5% of the wealth; the bottom two (2 out of 5) own 11%, etc
> income[1]/sum(income) [1] 0.05107471 > sum(income[1:2])/sum(income) [1] 0.1140305 > sum(income[1:3])/sum(income) [1] 0.2555648 > sum(income[1:4])/sum(income) [1] 0.4193262
If we plot those values, we get Lorenz curve
> plot(Lc(income)) > points(c(0:5)/5,c(0,cumsum(income)/sum(income)),pch=19,col="blue")