CoefVar | R Documentation |
Computes Coefficient of Variation inequality measure of a given variable taking into account weights.
CoefVar(X, W = rep(1, length(X)), square = FALSE)
X |
is a data vector |
W |
is a vector of weights |
square |
logical, argument of the function CoefVar, for details see below |
Coefficient of variation is given by:
CV= \frac{\sigma}{\mu}\times 100
where \sigma
is a standard deviation and \mu
is arithmetic mean.
The value of CoefVar coefficient.
Sheret M.: (1984) Social Indicators Research, An International and Interdisciplinary Journal for Quality-of-Life Measurement, Vol. 15, No. 3, Oct. ISSN 03038300
Coulter P. B.: (1989) Measuring Inequality ISBN 0-8133-7726-9
# Compare weighted and unweighted result
X=1:10
W=1:10
CoefVar(X)
CoefVar(X,W)
data(Tourism)
#Coefficient of variation for Total expenditure with sample weights
X=Tourism$`Total expenditure`
W=Tourism$`Sample weight`
CoefVar(X,W)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.