Computes a confidence interval for a population coefficient of dispersion which is defined as a mean absolute deviation from the median divided by a median. The coefficient of dispersion assumes ratio-scale scores and is a robust alternative to the coefficient of variation. An approximate standard error is recovered from the confidence interval.
ci.cod1(alpha, y)
alpha level for 1-alpha confidence
vector of scores
Returns a 1-row matrix. The columns are:
Estimate - estimated coefficient of dispersion
SE - recovered standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Bonett DG (2006). “Confidence interval for a coefficient of quartile variation.” Computational Statistics and Data Analysis, 50(11), 2953--2957. doi:doi.org/10.1016/j.csda.2005.05.007 .
y <- c(30, 20, 15, 10, 10, 60, 20, 25, 20, 30, 10, 5, 50, 40,
20, 10, 0, 20, 50)
ci.cod1(.05, y)
#> Estimate SE LL UL
#> [1,] 0.5921053 0.1814708 0.3813259 1.092679
# Should return:
# Estimate SE LL UL
# [1,] 0.5921053 0.1814708 0.3813259 1.092679