ci.median: Confidence interval for a median

View source: R/statpsych1.R

ci.medianR Documentation

Confidence interval for a median

Description

Computes a distribution-free confidence interval for a population median. Tied scores are assumed to be rare.

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

Usage

ci.median(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 median

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Snedecor1980statpsych

\insertRef

Bonett2021statpsych

Examples

y <- c(25, 29, 35, 36, 36, 40, 41, 43, 44, 54)
ci.median(.05, y)

# Should return:
#  Estimate       SE  LL  UL
#        38 3.261774  29  44



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