sampleSizeMcNemar: Sample size for McNemar test

View source: R/sampleSizeMcNemar.R

sampleSizeMcNemarR Documentation

Sample size for McNemar test

Description

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

Usage

sampleSizeMcNemar(p1, p2, sig.level = 0.05, power = 0.9)

Arguments

p1

Assumed marginal probability of the first row.

p2

Assumed marginal probability of the first column. Has to be larger than p1 and 0.5.

sig.level

Significance level.

power

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

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 Statistics in Medicine, 11, 1521–1525.

Examples


# example from Lachenbruch (1982), Table II, first row
sampleSizeMcNemar(p1 = 0.8, p2 = 0.9, sig.level = 0.05, power = 0.9)


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.