power.fdr.tt: Power and sample size for False Discovery Rate (FDR) with...

View source: R/power.fdr.tt.R

power.fdr.ttR Documentation

Power and sample size for False Discovery Rate (FDR) with t-tests

Description

Compute power and sample size of test or determine the effect size under alternative hypothesis to obtain target power for false discovery rate(same as power.anova.test).

Usage

  power.fdr.tt(n1=NULL, cc.ratio=1, pi0=0.99, fdr=0.05, delta=NULL, 
              power = NULL, sigma=1, tol = .Machine$double.eps^0.25)

Arguments

n1

Number of cases

cc.ratio

Control / case ratio, default is 1

fdr

False Discovery Rate (FDR)

power

Power of test (1 minus Type II error probability)

pi0

Percentage of null, default is 0.99

delta

Difference under althernative hypothesis

sigma

Variance of distribution

tol

tol for uniroot function

Details

Calculate power and sample size of study that requires control of False Discovery Rate (for example, analysis of RNA Micro-Array data. The algorithm is based on methods proposed by Liu and Hwang (2007).

Exactly one of the parameters 'n1','power' and 'delta' must be passed as NULL, and that parameter is determined from the others. Notice that the last one has non-NULL default so NULL must be explicitly passed if you want to compute it.

Value

Object of class 'power.htest', a list of the arguments (including the computed one) augmented with 'method' and 'note' elements.

case.control

A vector for number of cases and controls

n.total

Total number of sample size for the study

pi0

Percentage of null distributions

sigma

Varaince of the distribution

fdr

False Discovery Rate

Power

Power of the test

delta

Difference of means under althernative hypothesis

c.reject

Critical value to reject the null hypothesis

Note

'uniroot' is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the root when invalid arguments are given.

Author(s)

Bingshu E. Chen (bingshu.chen@queensu.ca)

References

Liu, P. and Hwang J T.(2007). Quick calculation for sample size while controlling false discovery rate with application to microarray analysis. Bioinformatics, 23, 739-746.

See Also

power.pga.snp, power.surv.test, power.t.test, pwr.2p.test

Examples

# Example from the paper.
power.fdr.tt(n1 = 45, delta = 0.3, pi0 = 0.9, sigma = 0.5, fdr = 0.1)

statapps/power.ctepd documentation built on April 26, 2024, 3:22 a.m.