R/statpsych1.R
ci.cqv1.Rd
Computes a distribution-free confidence interval for a population coefficient of quartile variation which is defined as (Q3 - Q1)/(Q3 + Q1) where Q1 is the 25th percentile and Q3 is the 75th percentile. The coefficient of quartile variation assumes ratio-scale scores and is a robust alternative to the coefficient of variation. The 25th and 75th percentiles are computed using the type = 2 method (SAS default).
ci.cqv1(alpha, y)
alpha level for 1-alpha confidence
vector of scores
Returns a 1-row matrix. The columns are:
Estimate - estimated coefficient of quartile variation
SE - standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Bonett DG, Seier E (2006). “Confidence interval for a coefficient of dispersion in nonnormal distributions.” Biometrical Journal, 48(1), 144--148. ISSN 0323-3847, doi:10.1002/bimj.200410148 .
y <- c(30, 20, 15, 10, 10, 60, 20, 25, 20, 30, 10, 5, 50, 40,
20, 10, 0, 20, 50)
ci.cqv1(.05, y)
#> Estimate SE LL UL
#> [1,] 0.5 0.1552485 0.2617885 0.8841821
# Should return:
# Estimate SE LL UL
# [1,] 0.5 0.1552485 0.2617885 0.8841821