weighted.coeffvar {acid} | R Documentation |
This function computes the Coefficient of Variation for a vector of observations and corresponding weights.
weighted.coeffvar(x, w)
x |
a vector of observations. |
w |
a vector of weights. |
cv |
returns the coefficient of variation without bias correction. |
bccv |
returns the coefficient of variation with bias correction. |
Weighting is not properly accounted for in the sample adjustment of bccv!
Alexander Sohn
Atkinson, A.B. and Bourguignon, F. (2000): Income Distribution and Economics, in: Atkinson and Bourguignon (eds.), Handbook of Income Distribution, pp. 1-86, Elsevier, Amsterdam.
# generate vector (of incomes) x <- c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261) w <- sample(1:10,length(x), replace=TRUE) weighted.coeffvar(x,w)