weighted_IQR {robsurvey} | R Documentation |
Weighted Interquartile Range (IQR)
Description
Weighted (normalized) interquartile range
Usage
weighted_IQR(x, w, na.rm = FALSE, constant = 0.7413)
Arguments
x |
|
w |
|
na.rm |
|
constant |
|
Details
By default, the weighted IQR is normalized to be an unbiased estimate of
scale at the Gaussian core model. If normalization is not wanted, put
constant = 1
.
Value
Weighted IQR
See Also
Overview (of all implemented functions)
Examples
head(workplace)
# normalized weighted IQR (default)
weighted_IQR(workplace$employment, workplace$weight)
# weighted IQR (without normalization)
weighted_IQR(workplace$employment, workplace$weight, constant = 1)
[Package robsurvey version 0.6 Index]