test.prop.ps: Hypothesis test for a paired-samples proportion difference

View source: R/statpsych3.R

test.prop.psR Documentation

Hypothesis test for a paired-samples proportion difference

Description

Computes a continuity-corrected McNemar test for equality of population proportions in a paired-samples design. This function requires the frequency counts from a 2 x 2 contingency table for two paired dichotomous measurements. A confidence interval for a difference in population proportions (see ci.prop.ps) is a recommended supplement to the McNemar test.

For more details, see Section 3.2 of Bonett (2021, Volume 3)

Usage

test.prop.ps(f00, f01, f10, f11)

Arguments

f00

number participants with y = 0 and x = 0

f01

number participants with y = 0 and x = 1

f10

number participants with y = 1 and x = 0

f11

number participants with y = 1 and x = 1

Value

Returns a 1-row matrix. The columns are:

  • Estimate - ML estimate of proportion difference

  • z - z test statistic

  • p - two-sided p-value

References

\insertRef

Snedecor1980statpsych

\insertRef

Bonett2021statpsych

Examples

test.prop.ps(12, 4, 26, 6)

# Should return:
#   Estimate      z       p
# -0.4583333 3.8341 0.00013



statpsych documentation built on Jan. 13, 2026, 1:07 a.m.