average.power.t.test {FDRsamplesize2}R Documentation

Compute average power of many t-tests

Description

Compute average power of many t-tests; Uses classical power formula for t-test; Assumes equal variance and sample size

Usage

average.power.t.test(
  n,
  alpha,
  delta,
  sigma = 1,
  type = "two.sample",
  alternative = "two.sided"
)

Arguments

n

per-group sample size (scalar)

alpha

p-value threshold (scalar)

delta

difference of population means (vector)

sigma

standard deviation (vector or scalar, default=1)

type

type of t-test: "two.sample", "one.sample"

alternative

one- or two-sided test

Value

Average power estimate for multiple testing procedure

Examples

d = rep(c(2,0),c(100,900));
average.power.t.test(n = 20, alpha = 0.05,delta = d)

[Package FDRsamplesize2 version 0.2.0 Index]