if (interactive()) {
# generate a vector (of incomes)
# y <- c(80, 60, 10, 20, 30)
# Entropy 1.392321
# Maximum Entropy 1.609438
# Normalized Entropy 0.865098
# Exponential Index 0.248498
# Herfindahl 0.285000
# Normalized Herfindahl 0.106250
# Gini Coefficient 0.360000
# Concentration Coefficient 0.450000
x <- c(778, 815, 857, 888, 925, 930, 965, 990, 1012)
# compute Atkinson coefficient with epsilon=0.5
Atkinson(x, epsilon=0.5)
w <- c(10, 15, 20, 25, 40, 20, 30, 35, 45, 90)
}
Run the code above in your browser using DataLab