Computes a distribution-free confidence interval for a population median.
ci.median1 is deprecated and will soon be removed from statpsych; please switch to ci.median
ci.median(alpha, y)
ci.median1(alpha, y)
alpha level for 1-alpha confidence
vector of scores
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
Snedecor GW, Cochran WG (1989). Statistical Methods, 8th edition. ISU University Pres, Ames, Iowa.
y <- c(30, 20, 15, 10, 10, 60, 20, 25, 20, 30, 10, 5, 50, 40,
20, 10, 0, 20, 50)
ci.median(.05, y)
#> Estimate SE LL UL
#> 20 4.270922 10 30
# Should return:
# Estimate SE LL UL
# 20 4.270922 10 30