pwr_mcnemar: Sample Size and Power for McNemar's Test

View source: R/pwr_McNemar.R

pwr_mcnemarR Documentation

Sample Size and Power for McNemar's Test

Description

Computes sample size or power for McNemar's test for paired nominal data.

Usage

pwr_mcnemar(p10, p01, alpha = 0.05, n, power)

Arguments

p10

Probability of pre-test success and post-test failure. See details.

p01

Probability of pre-test failure and post-test success. See details.

alpha

Specified significance level. Defaults to 0.05.

n

Sample size. Cannot be left blank if power is missing.

power

Statistical power. Cannot be left blank if n is missing.

Details

H0: Both groups have the same success probability. H1: The success probability is not equal between the Groups.

Post Success Failure Success p11 p10 Pre Failure p01 p00

References

github/bgreenwell For Code

Connor R. J. 1987. Sample size for testing differences in proportions for the paired-sample design. Biometrics 43(1):207-211. page 209.

Examples

pwr.mcnemar(0.05, 0.45, power = 0.8)
pwr.mcnemar(0.05, 0.45, n = 22)

Ajfrick/ajfhelpR documentation built on June 30, 2023, 12:56 a.m.