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 proportions in a paired-samples design. This function requires the frequency counts from a 2 x 2 contingency table for two paired dichotomous measurements.

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 - p-value

References

\insertRef

Snedecor1980statpsych

Examples

test.prop.ps(156, 96, 68, 80)

# Should return:
#      Estimate        z          p
# [1,]     0.07 2.108346 0.03500109



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