ci.lc.prop.bs {statpsych} | R Documentation |
Computes an adjusted Wald confidence interval for a linear contrast of proportions in a betwen-subjects design.
ci.lc.prop.bs(alpha, f, n, v)
alpha |
alpha level for 1-alpha confidence |
f |
vector of frequency counts of participants with attribute |
n |
vector of sample sizes |
v |
vector of between-subjects contrast coefficients |
Returns a 1-row matrix. The columns are:
Estimate - adjusted estimate of proportion linear contrast
SE - adjusted standard error
z - z test statistic
p - p-value
LL - lower limit of the adjusted Wald confidence interval
UL - upper limit of the adjusted Wald confidence interval
Price RM, Bonett DG (2004). “An improved confidence interval for a linear function of binomial proportions.” Computational Statistics & Data Analysis, 45(3), 449–456. ISSN 01679473, doi: 10.1016/S0167-9473(03)00007-0.
f <- c(26, 24, 38) n <- c(60, 60, 60) v <- c(-.5, -.5, 1) ci.lc.prop.bs(.05, f, n, v) # Should return: # Estimate SE z p LL UL # [1,] 0.2119565 0.07602892 2.787841 0.005306059 0.06294259 0.3609705