n_ancova: Sample Size Calculation for the Analysis of Covariances...

Description Usage Arguments Details Value Examples

View source: R/n_ancova.R

Description

n_ancova performs the Sample Size calculation for the test on mean difference for two samples with an Analysis of Covariances (ANCOVA). The method is based on the pages 18 - 20 in [1]. The Sample Size is calculated using an approximative formula, suggested by Frison & Pocock (1999), implemented (4.14) in [1].

Usage

1
n_ancova(effect, corr, sd, alpha, power, r = 1, gs = TRUE)

Arguments

effect

Effect Δ_A used as alternative hypothesis.

corr

Correlation rho to Covariate.

sd

Standard deviation σ.

alpha

Significance level α.

power

Desired Power 1-β.

r

Quotient of Sample sizes r = n_Y / n_X.

gs

Guenther/Schouten correcture. Default = TRUE. If set to TRUE, the G/S correcture like in (4.15) in [1] is used.

Details

Null Hypothesis:

μ_Y - μ_X = 0

Alternative Hypothesis:

|μ_Y - μ_X| ≥ Δ_A

[1] M.Kieser: Fallzahlberechnung in der medizinischen Forschung [2018], 1th Edition Exact power output is going to be implemented in the future.

Value

n_ancova 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. WARNING: This function is not implemented yet.

Examples

1
n_ancova(effect = 10, corr = .5, sd = 20, alpha = .05, power = .90, r = 1)

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