Apouey {wINEQ} | R Documentation |
Apouey index
Description
Computes Apouey inequality measure of a given variable taking into account weights.
Usage
Apouey(
X,
W = rep(1, length(X)),
a = 2/(1 - length(W[!is.na(W) & !is.na(X)])),
b = length(W[!is.na(W) & !is.na(X)])/(length(W[!is.na(W) & !is.na(X)]) - 1)
)
Arguments
X |
is a data vector (numeric or ordered factor) |
W |
is a vector of weights |
a |
is a positive parameter. See more in details |
b |
is a real parameter. See more in details |
Details
Let be the median category,
will be the number of categories and
be the cumulative distribution of
-th category. The following index was proposed by Apouey (2007):
where and
are given parameters with default values
and
.
Value
The value of Apouey coefficient.
References
Apouey B.: (2007) Measuring health polarization with self-assessed health data, Health Economics 16; 875-894.
Examples
# Compare weighted and unweighted result
X=1:10
W=1:10
Apouey(X,a=2,b=2)
Apouey(X,W,a=2,b=2)
data(Well_being)
# Apouey index for health assessment with sample weights
X=Well_being$V1
W=Well_being$Weight
Apouey(X,W,a=2,b=2)
[Package wINEQ version 1.2.0 Index]