BL {wINEQ} | R Documentation |
Blair and Lacy index
Description
Computes Blair and Lacy inequality measure of a given variable taking into account weights.
Usage
BL(X, W = rep(1, length(X)), withsqrt = FALSE)
Arguments
X |
is a data vector (numeric or ordered factor) |
W |
is a vector of weights |
withsqrt |
if TRUE function returns index given by BL2, elsewhere by BL (default). See more in details. |
Details
Let m
be the median category, n
be the number of categories and P_i
be the cumulative distribution of i
-th category.
The indices of Blair and Lacy (2000) are the following:
BL = 1-\frac{\sum_{i=1}^{n-1}(P_{i}-0.5)^2}{\frac{n-1}{4}}
BL2 = 1-\left(\frac{\sum_{i=1}^{n-1}(P_{i}-0.5)^2}{\frac{n-1}{4}}\right)^{\frac{1}{2}}
Value
The value of Blair and Lacy coefficient.
References
Blair J, Lacy M G. (2000): Statistics of ordinal variation, Sociological Methods and Research 28(251);251-280.
Examples
# Compare weighted and unweighted result
X=1:10
W=1:10
BL(X)
BL(X,W)
data(Well_being)
# Blair and Lacy index for health assessment with sample weights
X=Well_being$V1
W=Well_being$Weight
BL(X,W)
[Package wINEQ version 1.2.0 Index]