Learn R Programming

wINEQ (version 1.2.1)

CoefVar: Coefficient of Variation

Description

Computes Coefficient of Variation inequality measure of a given variable taking into account weights.

Usage

CoefVar(X, W = rep(1, length(X)), square = FALSE)

Value

The value of CoefVar coefficient.

Arguments

X

is a data vector

W

is a vector of weights

square

logical, argument of the function CoefVar, for details see below

Details

Coefficient of variation is given by: $$CV= \frac{\sigma}{\mu}\times 100$$ where \(\sigma\) is a standard deviation and \(\mu\) is arithmetic mean.

References

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

Examples

Run this code
# 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)


Run the code above in your browser using DataLab