Description Usage Arguments Details Value Author(s) References Examples
This function computes Coefficient of Variation for quantifying diversity as disparity.
1 | coeff.variation(X, min, max)
|
X |
A numeric vector with group data. |
min |
The minimum value for the random variable. |
max |
The maximum value for the random variable. |
Coefficient of Variation can be obtained by means of the ratio sd(X)/mean(X). Coefficient of Variation is is lower and upper bounded, its minimum and maximum values being respectively equal to zero and (n-1)^{1/2}. This maximum value can be obtained only if minimum value equals 0. coef.variation
provides proper maximum values for Coefficient of Variation taking into account any minimum value. Furthermore it computes normalized Coefficient of Variation that ranges from 0 to 1.
The function returns a list of class coeffvar
with following
components:
call |
Function call. |
data |
Original data vector. |
min |
Minimum value for the random variable. |
max |
Maximum value for the random variable. |
cv |
Coefficient of Variation. |
cv.max |
Maximum value of Coefficient of Variation. |
cv.norm |
Normalized value of Coefficient of Variation. |
Antonio Solanas, Rejina M. Selvam, Jose Navarro and David Leiva.
Solanas, A., Selvam, R. M., Navarro, J., & Leiva, D. (2010). On the measurement of diversity in organizations. Unpublished manuscript.
1 2 3 4 5 6 7 8 | ex.1 <- c(30,rep(60,3))
coeff.variation(ex.1,30,60)
ex.2 <- c(60,rep(30,3))
coeff.variation(ex.2,30,60)
ex.3 <- c(rep(30,2),rep(60,2))
coeff.variation(ex.3,30,60)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.