prop.test.equiv: Power calculation for test of equivalence of two proportions

prop.test.equivR Documentation

Power calculation for test of equivalence of two proportions

Description

Performs power and sample size calculations for a test of equivalence for two proportions. Can solve for power, n1, n.ratio or alpha.

Usage

prop.test.equiv(
  n1 = NULL,
  n.ratio = 1,
  p1 = NULL,
  p2 = NULL,
  margin = NULL,
  alpha = 0.05,
  power = NULL,
  v = FALSE
)

Arguments

n1

The sample size for group 1.

n.ratio

The ratio n2/n1 between the sample sizes of two groups; defaults to 1 (equal group sizes).

p1

The outcome proportion in group 1.

p2

The outcome proportion in group 2.

margin

The equivalence margin.

alpha

The significance level or type 1 error rate; defaults to 0.05.

power

The specified level of power.

v

Either TRUE for verbose output or FALSE to output computed argument only.

Value

A list of the arguments (including the computed one).

Examples

prop.test.equiv(n1 = NULL, p1 = 0.5, p2 = 0.5, margin = 0.1, alpha = 0.05, power = 0.8)

powertools documentation built on April 4, 2025, 5:02 a.m.