sampleSizeMcNemar: Compute sample size for McNemar test

Description Usage Arguments Details Value Author(s) References Examples

Description

Compute sample size to test the null hypothesis of the McNemar test.

Usage

1
sampleSizeMcNemar(p1, p2, alpha = 0.05, power = 0.8)

Arguments

p1

Assumed marginal probability of the first row.

p2

Assumed marginal probability of the first column.

alpha

Significance level.

power

Desired power, i.e. 1 - probability of type II error.

Details

Given two samples of paired binary observations, e.g. results of some positive/negative test on the same experimental units we want to assess the null hypothesis whether the probability of positives by the first method is equal that of positives by the second method.

Value

N

Vector of min, max, and mid sample size as explained in Lachenbruch (1982).

Author(s)

Kaspar Rufibach
kaspar.rufibach@gmail.com

References

Lachenbruch (1992). Sample Size for Studies based on McNemar's test Stat. Med., 11, 1521–1525.

Examples

1
2
# example from Lachenbruch (1982), Table II, first row
sampleSizeMcNemar(p1 = 0.8, p2 = 0.9, alpha = 0.05, power = 0.9)

biostatUZH documentation built on May 2, 2019, 6:06 p.m.