Learn R Programming

statpsych (version 1.7.0)

ci.cqv: Confidence interval for a coefficient of quartile variation

Description

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).

Usage

ci.cqv(alpha, y)

Value

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

Arguments

alpha

alpha level for 1-alpha confidence

y

vector of scores

References

Bonett2006cstatpsych

Examples

Run this code
y <- c(30, 20, 15, 10, 10, 60, 20, 25, 20, 30, 10, 5, 50, 40,
       20, 10, 0, 20, 50)
ci.cqv(.05, y)

# Should return:
# Estimate        SE        LL       UL
#      0.5 0.1552485 0.2617885 0.8841821


Run the code above in your browser using DataLab