Coefficient of quartile variation (\(CQV\)) is a measure of relative
dispersion that is based on interquartile range (IQR).
Since cqv is unitless, it is useful for comparison of variables
with different units. It is also a measure of homogeneity (Altunkaynak & Gamgam, 2018; Bonett,
2006).
The population coefficient of quartile variation is:
\[
CQV = \biggl(\frac{Q_3-Q_1}{Q_3+Q_1}\biggr)\times100
\] where \(q_3\) and \(q_1\) are the population third quartile
(i.e., \(75^{th}\) percentile)
and first quartile (i.e., \(25^{th}\) percentile), respectively. Almost
always, we analyze data from samples but want to generalize it as the
population’s parameter (Albatineh, Kibria,
Wilcox, & Zogheib, 2014). Its sample’s estimate is given
as:
\[
cqv = \biggl(\frac{q_3-q_1}{q_3+q_1}\biggr)\times100
\] There are different methods for the calculation of
confidence intervals (CI) for CQV. All of them
are fruitful and have particular use cases. For sake of versatility, we
cover almost all of these methods in cvcqv package. Here,
we explain them along with some examples:
Bonett (Bonett, 2006) introduced the
following confidence interval for CQV:
\[
\exp\{\ln{(D/S)c\ \pm\ Z_{1-\alpha/2}\sqrt{v} }\}
\] where \(c = n/(n-1)\) is a
centering adjustment which helps to equalize the tail error
probabilities (Altunkaynak & Gamgam, 2018;
Bonett, 2006). \(D =
\hat{Q3}-\hat{Q1}\) and \(S =
\hat{Q3}+\hat{Q1}\) are the sample \(25^{th}\) and \(75^{th}\) percentiles, respectively; \(Z_{1-\alpha/2}\) is the \(1-\alpha/2\) quantile of the standard
normal distribution. Computation of \(v\) which is \(Var\{\ln{(D/S)}\}\) is long and a bit
complicated, but has been implemented for cqv function:
x <- c(
0.2, 0.5, 1.1, 1.4, 1.8, 2.3, 2.5, 2.7, 3.5, 4.4,
4.6, 5.4, 5.4, 5.7, 5.8, 5.9, 6.0, 6.6, 7.1, 7.9
)
cqv_versatile(
x,
na.rm = TRUE,
digits = 3,
method = "bonett"
)## $method
## [1] "cqv with Bonett 95% CI"
##
## $statistics
## est lower upper
## 45.625 24.785 77.329
Thanks to package boot (Canty
& Ripley, 2017) we can obtain bootstrap CI around \(cqv\):
## $method
## [1] "cqv with adjusted bootstrap percentile (BCa) 95% CI"
##
## $statistics
## est lower upper
## 45.625 22.222 83.264
In conclusion, we can observe CIs calculated by all available methods:
## $method
## [1] "All methods"
##
## $statistics
## est lower upper
## bonett 45.625 24.785 77.329
## norm 45.625 19.741 72.152
## basic 45.625 20.831 75.380
## percent 45.625 15.870 70.419
## bca 45.625 24.731 84.000
## description
## bonett cqv with Bonett 95% CI
## norm cqv with normal approximation 95% CI
## basic cqv with basic bootstrap 95% CI
## percent cqv with bootstrap percentile 95% CI
## bca cqv with adjusted bootstrap percentile (BCa) 95% CI