power_ttest: Power of a t-test

View source: R/power_ttest.R

power_ttestR Documentation

Power of a t-test

Description

Power calculation of a one-sided two-sample t-test from the non-central t-distribution. The variances are equal between the groups, the sample sizes must not be equal.

Usage

power_ttest(variance, n, alloc, delta, sig_level)

Arguments

variance

assumed within-group variance

n

total sample size

alloc

numeric vector of sample size proportion within group

delta

assumed treatment effect

sig_level

level of significance

Value

power of the one-sided two-sample t-test

Examples

power_ttest(variance = 1, alloc = c(0.5, 0.5),
            delta = 0.5, sig_level = 0.025, n = 126)

tobiasmuetze/varmap documentation built on Dec. 8, 2022, 2:16 p.m.