hem.fdr: FDR Evaluation

Description Usage Arguments Value Author(s) See Also Examples

View source: R/hem.fdr.R

Description

Computes resampling-based False Discovery Rate (FDR)

Usage

1
2
3
hem.fdr(dat,  n.layer, design, rep=TRUE, hem.out, eb.out=NULL, n.iter=5, q.trim=0.9,
        target.fdr=c(0.001, 0.005, 0.01, 0.05, 0.1, 0.15, 0.20, 0.30, 0.40, 0.50),
        n.digits=10, print.message.on.screen=TRUE)

Arguments

dat

data

n.layer

number of layers: 1=one-layer EM; 2=two-layer EM

design

design matrix

rep

no replication if FALSE

hem.out

output from hem function

eb.out

output from hem.eb.prior function

n.iter

number of iterations

q.trim

quantile used for estimtaing the proportion of true negatives (pi0)

target.fdr

Target FDRs

n.digits

number of digits

print.message.on.screen

if TRUE, process status is shown on screen.

Value

fdr

H-values and corresponding FDRs

pi0

estimated proportion of true negatives

H.null

H-scores from null data

targets

given target FDRs, corrsponding critical values and numbers of significant genes are provided

Author(s)

HyungJun Cho and Jae K. Lee

See Also

hem.eb.prior hem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
data(pbrain)

##construct a design matrix
cond <- c(1,1,1,1,1,1,2,2,2,2,2,2)
ind  <- c(1,1,2,2,3,3,1,1,2,2,3,3)
rep  <- c(1,2,1,2,1,2,1,2,1,2,1,2)
design <- data.frame(cond,ind,rep)

##normalization
pbrain.nor <- hem.preproc(pbrain[,2:13])

##take a subset for a testing purpose;
##use all genes for a practical purpose
pbrain.nor <- pbrain.nor[1:1000,]

##estimate hyperparameters of variances by LPE
#pbrain.eb  <- hem.eb.prior(pbrain.nor, n.layer=2,  design=design,
#                           method.var.e="neb", method.var.b="peb")     

##fit HEM with two layers of error
##using the small numbers of burn-ins and MCMC samples for a testing purpose;
##but increase the numbers for a practical purpose 
#pbrain.hem <- hem(pbrain.nor, n.layer=2,  design=design,burn.ins=10, n.samples=30, 
#              method.var.e="neb", method.var.b="peb", 
#              var.e=pbrain.eb$var.e, var.b=pbrain.eb$var.b)

##Estimate FDR based on resampling 
#pbrain.fdr <- hem.fdr(pbrain.nor, n.layer=2,  design=design, 
#                  hem.out=pbrain.hem, eb.out=pbrain.eb)

HEM documentation built on Nov. 8, 2020, 5:57 p.m.