sample_size: sample_size

Description Usage Arguments Details Value Examples

View source: R/sampleSize.R

Description

A function to estitamete the sample size for differential expression analysis of RNA-seq data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sample_size(
  power = 0.8,
  m = 20000,
  m1 = 200,
  f = 0.1,
  k = 1,
  w = 1,
  rho = 2,
  lambda0 = 5,
  phi0 = 1,
  showMessage = FALSE,
  storeProcess = FALSE
)

Arguments

power

Power to detecte prognostic genes.

m

Total number of genes for testing.

m1

Expected number of prognostic genes.

f

FDR level

k

Ratio of sample size between two groups.

w

Ratio of normalization factors between two groups.

rho

minimum fold changes for prognostic genes between two groups.

lambda0

Average read counts for prognostic genes.

phi0

Dispersion for prognostic genes.

showMessage

Logical. Display the message in the estimation process.

storeProcess

Logical. Store the power and n in sample size or power estimation process.

Details

A function to estitamete the sample size for differential expression analysis of RNA-seq data.

Value

Estimate sample size or a list including parameters and sample size in the process.

Examples

1
2
power<-0.8;rho<-2;lambda0<-5;phi0<-0.5;f<-0.01
sample_size(power=power, f=f,rho=rho, lambda0=lambda0, phi0=phi0)

Example output

Loading required package: RnaSeqSampleSizeData
Loading required package: edgeR
Loading required package: limma
[1] 63

RnaSeqSampleSize documentation built on Nov. 8, 2020, 6:54 p.m.