ci.mad: Confidence interval for a mean absolute deviation

View source: R/statpsych1.R

ci.madR Documentation

Confidence interval for a mean absolute deviation

Description

Computes a confidence interval for a population mean absolute deviation from the median (MAD). The MAD is a robust alternative to the standard deviation.

For more details, see Section 1.26 of Bonett (2021, Volume 1)

Usage

ci.mad(alpha, y)

Arguments

alpha

alpha level for 1-alpha confidence

y

vector of scores

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated mean absolute deviation

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Bonett2003bstatpsych

\insertRef

Bonett2021statpsych

Examples

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

# Should return:
# Estimate       SE       LL       UL
#     12.5 2.876103 7.962667 19.62282



statpsych documentation built on Jan. 13, 2026, 1:07 a.m.