Computes adjusted Wald interval for the population proportion of quantitative scores that are greater than the null hypothesis value of the population median in a one-sample sign test.
ci.sign(alpha, y, h)
alpha level for 1-alpha confidence
vector of y scores
null hypothesis value for population median
Returns a 1-row matrix. The columns are:
Estimate - adjusted estimate of proportion
SE - adjusted standard error
LL - lower limit of adjusted Wald confidence interval
UL - upper limit of adjusted Wald confidence interval
Agresti, A, & Coull, BA (1998) Approximate is better than “exact” for interval estimation of binomial proportions. American Statistician, 52, 119–126. doi: 10.1080/00031305.1998.10480550
y <- c(30, 20, 15, 10, 10, 60, 20, 25, 20, 30, 10, 5, 50, 40, 20, 10,
0, 20, 50)
ci.sign(.05, y, 9)
#> Estimate SE LL UL
#> 0.826087 0.0790342 0.6711828 0.9809911
# Should return:
# Estimate SE LL UL
# 0.826087 0.0790342 0.6711828 0.9809911