n_chisq_mult_groups: Sample Size Calculation for the Chi-Square Test comparing...

Description Usage Arguments Details Value Examples

View source: R/n_chisq_mult_groups.R

Description

n_chisq_mult_groups performs the Sample Size calculation for the Chi-Square test comparing rates of k > 2 independent samples. The method used here is based on the page 30 in [1]. The Sample Size is calculated using an iterative approach using (6.3) in [1].

Null Hypothesis:

p_1 = p_2 = ... = p_k

Alternative Hypothesis:

There are i,j with p_i \ne p_j

Usage

1
n_chisq_mult_groups(p_A, n.groups, alpha, power)

Arguments

p_A

Vector \p_A of expected rates on the alternative.

n.groups

Number of Groups k.

alpha

Significance level α.

power

Desired Power 1-β.

Details

[1] M.Kieser: Fallzahlberechnung in der medizinischen Forschung [2018], 1th Edition

Value

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

Examples

1
n_chisq_mult_groups(p_A = c(.3, .5, .4), n.groups = 3, alpha = .05, power = .8)

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