n_ftest: Sample Size Calculation for the f Test comparing means of k >...

Description Usage Arguments Details Value Examples

View source: R/n_ftest.R

Description

n_ftest performs the Sample Size calculation for the f-test comparing means of k > 2 independent samples. The method used here is based on the page 29 in [1]. The Sample Size is calculated using an iterative approach.

Null Hypothesis:

μ_1 = μ_2 = ... = μ_k

Alternative Hypothesis:

There are i,j with μ_i \ne μ_j

Usage

1
n_ftest(mu_A, sd, n.groups, alpha, power)

Arguments

mu_A

Vector μ_A of expected means on the alternative.

sd

Standard deviation sigma.

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_ftest 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_ftest(mu_A = c(1, 2, 3), sd = 20, n.groups = 3, alpha = .025, power = .8)

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