power_hd: Power calculator for high-dimensional testing

View source: R/power-hd.r

power_hdR Documentation

Power calculator for high-dimensional testing

Description

The function sets up a root-finding problem in which the appropriate per-test cutoff alpha is found that satisfies the supplied FDR (in expectation), then reports overall power for tests carried out at that alpha level. Vectorized over n, but nothing else.

Usage

power_hd(n, p, d, m, FDR = 0.1)

Arguments

n

Sample size (per group)

p

Number of features (genes)

d

Number of differential features (differentially expressed genes)

m

Minimum difference among differential features, in terms of mean difference divided by SD (effect size)

FDR

Target FDR

Details

Further reading:

  • Pawitan2005: Original idea

  • wiki: Derivation and explanation

Value

A list containing three items:

  • expected_hits: Expected number of discoveries (marginal power multiplied by number of differential features)

  • marginal_power: Power to detect a given feature (function assumes this is the same for all features)

  • disjunctive_power: Power to detect at least one feature

Examples

power_hd(10, 1000, 100, 1)
power_hd(seq(10, 100, by=10), 1000, 100, 1)
power_hd(300, 100000, 50, 0.2)

pbreheny/breheny documentation built on Sept. 5, 2024, 6:45 p.m.