## Mobile 2010 Household income
## (http://www.clrsearch.com/Mobile-Demographics/AL/Household-Income)
## reported mean $61291, median $42574.
breaks <- c(0,15000,25000,35000,50000,75000,100000,125000,150000,200000,Inf)
x <- c(15783,9748,9150,11512,13609,9422,4861,2565,1843,2495)
## par(mfrow=c(2,2))
(out1 <- bde(x,breaks, dist='gb'))
## (out2 <- bde(x,breaks, dist='weibull'))
## (out3 <- bde(x,breaks, dist='ewd'))
## (out4 <- bde(x,breaks, dist='dagum'))
hist(out1)
lines(out1, col=2, lwd=2)
## hist(out2)
## lines(out2, col=2, lwd=2)
## hist(out3)
## lines(out3, col=2, lwd=2)
## hist(out4)
## lines(out4, col=2, lwd=2)
Run the code above in your browser using DataLab