ci.pairs.prop.bs: Bonferroni confidence intervals for all pairwise proportion...

View source: R/statpsych3.R

ci.pairs.prop.bsR Documentation

Bonferroni confidence intervals for all pairwise proportion differences in a between-subjects design

Description

Computes adjusted Wald confidence intervals for all pairwise differences of proportions in a between-subjects design with a Bonferroni adjusted alpha level.

Usage

ci.pairs.prop.bs(alpha, f, n)

Arguments

alpha

alpha level for simultaneous 1-alpha confidence

f

vector of frequency counts of participants who have the attribute

n

vector of sample sizes

Value

Returns a 1-row matrix. The columns are:

  • Estimate - adjusted estimate of proportion difference

  • 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

References

\insertRef

Agresti2000statpsych

Examples

f <- c(111, 161, 132)
n <- c(200, 200, 200)
ci.pairs.prop.bs(.05, f, n)

# Should return:
#        Estimate         SE         z            p          LL          UL
# 1 2  -0.2475248 0.04482323 -5.522243 3.346989e-08 -0.35483065 -0.14021885
# 1 3  -0.1039604 0.04833562 -2.150803 3.149174e-02 -0.21967489  0.01175409
# 2 3   0.1435644 0.04358401  3.293968 9.878366e-04  0.03922511  0.24790360



statpsych documentation built on July 9, 2023, 6:50 p.m.