n_fisher_boschloo: Sample Size Calculation for the Fisher-Boschloo-Test

Description Usage Arguments Details Value Examples

View source: R/n_fisher_boschloo.R

Description

n_fisher_boschloo performs the Sample Size calculation for two independent samples with binary data using the absolute rate difference quantifying the effect of an intervention. The method used here is written by S. Wellek. See [2] for further details.

Usage

1
2
n_fisher_boschloo(p_Y, p_X, alpha, power, r, exact = TRUE, SW = 1e-04,
  MAXH = 10)

Arguments

p_Y

Event rate of Group Y on the alternative.

p_X

Event rate of Group X on the alternative.

alpha

Significance level α.

power

Desired Power 1-β.

r

Quotient of Sample sizes r = n_Y / n_X.

exact

Default = TRUE. If set to FALSE the approximative sample size is calculated. On TRUE the exact sample size is calculated.

SW

Default = .0001. Step width.

MAXH

Default = 10.

Details

Null Hypothesis:

p_Y - p_X = 0

Alternative Hypothesis:

|p_Y - p_X| ≥ Δ_A

[2] S. Wellek: Nearly exact sample size calculation for powerful non-randomized tests for differences between binomial proportions [2015], Statistica Neerlandica

Value

n_fisher_boschloo returns an object of type list. The resulting Sample Sizes are located in entrys named n_X, n_Y, n. The resulting power is named power_out.

Examples

1
2
3
n_fisher_boschloo(p_Y = .5, p_X = .3, alpha = .05, power = .8, r = 2)
n_fisher_boschloo(p_Y = .5, p_X = .3, alpha = .05, power = .8, r = 2)$n
n_fisher_boschloo(p_Y = .5, p_X = .3, alpha = .05, power = .8, r = 2, power.exact = FALSE)

goseberg/samplesizr documentation built on May 28, 2019, 8:43 a.m.