ci.slope.prop.bs {statpsych}R Documentation

Confidence interval for a slope of a proportion in a single-factor design with a quantitative between-subjects factor

Description

Computes a test statistic and an adjusted Wald confidence interval for the slope of proportions in a single-factor design with a quantitative between-subjects factor.

Usage

ci.slope.prop.bs(alpha, f, n, x)

Arguments

alpha

alpha level for 1-alpha confidence

f

vector of frequency counts of participants who have the attribute

n

vector of sample sizes

x

vector of quantitative factor values

Value

Returns a 1-row matrix. The columns are:

References

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.

Examples

f <- c(14, 27, 38)
n <- c(100, 100, 100)
x <- c(10, 20, 40)
ci.slope.prop.bs(.05, f, n, x)

# Should return:
#    Estimate          SE        z           p          LL         UL
# 0.007542293 0.002016793 3.739746 0.000184206 0.003589452 0.01149513



[Package statpsych version 1.5.0 Index]