# FDRforTailPP

0th

Percentile

##### FDR for tail posterior probability

Calculate the false discovery rate (FDR) for the tail posterior probability

Keywords
htest
##### Usage
FDRforTailPP(tpp, a1, a2 = NULL, n.rep1, n.rep2 = NULL, prec = 0.05, p.cut = 0.7, N = 10000, pp0=NULL, plot = T)
##### Arguments
tpp
vector of tail posterior probabilities
a1
posterior mean of the shape parameter of the inverse gamma distribution - prior for the variance in condition 1
a2
posterior mean of the shape parameter of the inverse gamma distribution - prior for the variance in condition 2
n.rep1
number of replicates in condition 1
n.rep2
number of replicates in condition 2
prec
precision of the estimate of the cumulative distribution function of tail posterior probability under H0 (at points 1 - k*prec, k =1,2,..)
p.cut
to save time, calculate FDR only for cutoffs on tail posterior probability > p.cut
N
simulation size for tail posterior probability under H0
pp0
a vector of simulated tail posterior probabilities under H0
plot
if True, the estimated pi0 at different locations and the median estimate is plotted
##### Value

pi0
estimate of pi0 - proportion of non-differentially expressed genes
FDR
estimate of FDR for all (distinct) cutoffs > p.cut

##### References

Bochkina N., Richardson S. (2007) Tail posterior probability for inference in pairwise and multiclass gene expression data. Biometrics.

• FDRforTailPP
##### Examples

data(ybar, ss)
nreps <- c(8,8)

## Note this is a very short MCMC run!
## For good analysis need proper burn-in period.
outdir <- BGmix(ybar, ss, nreps, jstar=-1, nburn=0, niter=100, nthin=1)

params <- ccParams(outdir)
res <-  ccTrace(outdir)

tpp.res <- TailPP(res, nreps, params, plots  = FALSE)
FDR.res = FDRforTailPP(tpp.res$tpp, a1 = params$maa[1],
a2 = params\$maa[2], n.rep1=nreps[1], n.rep2=nreps[2], p.cut = 0.8)

Documentation reproduced from package BGmix, version 1.32.0, License: GPL-2

### Community examples

Looks like there are no examples yet.