powered by
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)
ci.median(alpha, y)
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
alpha level for 1-alpha confidence
vector of scores
Snedecor1980statpsych
Bonett2021statpsych
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
Run the code above in your browser using DataLab