ci.lc.prop.bs: Confidence interval for a linear contrast of proportions in a...

View source: R/statpsych3.R

ci.lc.prop.bsR Documentation

Confidence interval for a linear contrast of proportions in a between- subjects design

Description

Computes an adjusted Wald confidence interval for a linear contrast of population proportions in a between-subjects design.

Usage

ci.lc.prop.bs(alpha, f, n, v)

Arguments

alpha

alpha level for 1-alpha confidence

f

vector of frequency counts of participants who have the attribute

n

vector of sample sizes

v

vector of between-subjects contrast coefficients

Value

Returns a 1-row matrix. The columns are:

  • Estimate - adjusted estimate of proportion linear contrast

  • SE - adjusted standard error

  • z - z test statistic

  • p - two-sided p-value

  • LL - lower limit of the adjusted Wald confidence interval

  • UL - upper limit of the adjusted Wald confidence interval

References

\insertRef

Price2004statpsych

Examples

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
# 0.2119565 0.07602892 2.787841 0.005306059 0.06294259 0.3609705



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.