test.prop2: Hypothesis test for a 2-group proportion difference

View source: R/statpsych3.R

test.prop2R Documentation

Hypothesis test for a 2-group proportion difference

Description

Computes a continuity-corrected z test for a difference of proportions in a 2-group design.

Usage

test.prop2(f1, f2, n1, n2)

Arguments

f1

number of group 1 participants who have the attribute

f2

number of group 2 participants who have the attribute

n1

sample size for group 1

n2

sample size for group 2

Value

Returns a 1-row matrix. The columns are:

  • Estimate - ML estimate of proportion difference

  • z - z test statistic

  • p - p-value

References

\insertRef

Snedecor1980statpsych

Examples

test.prop2(11, 26, 50, 50)

# Should return:
#  Estimate        z           p
#      -0.3 2.899726 0.003734895



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