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.

ci.median1 is deprecated and will soon be removed from statpsych; please switch to ci.median

Usage

ci.median(alpha, y)

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

Examples

y <- c(30.2, 20.4, 15.1, 10.2, 10.5, 60.8, 20.8, 25.0, 20.7, 30.9, 10.8, 5.1,
         50.9, 40.0, 20.9, 10.8, 0, 20.5, 50.8)
ci.median(.05, y)

# Should return:
#  Estimate       SE   LL   UL
#      20.7 4.292277 10.8 30.9



statpsych documentation built on April 4, 2025, 3:20 a.m.