TailPP: Tail posterior probability for BGmix output.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/TailPP.R

Description

For differential expression models with unstructured priors (no mixture prior), calculates tail posterior probabality and FDR, and plots a histogram. Uses whole posterior distributions of likelihood parameters (found by 'ccTrace') and posterior means of hyperparameters (found by 'ccParams').

Usage

1
TailPP(res, nreps, params, paired=F, alpha=0.05, N = 5000, prec=0.05, p.cut = 0.7, plots  = T, plot.pi0=F)

Arguments

res

list object output from 'ccTrace'

nreps

vector length 2 containing the number of replicates in each condition

params

list object output from 'ccParams'

paired

logical. TRUE for paired design, FALSE for unpaired.

alpha

parameter of the tail posterior probability (1-alpha/2 quantile)

N

simulation size for tail posterior probability under H0

prec

parameter used when estimating CDF of tail posterior probability under H0

p.cut

calculate FDR only for cutoffs on tail posterior probability > p.cut

plots

logical. if TRUE, makes plots of the histogram of tail posterior probability with the null density and of FDR

plot.pi0

logical. if TRUE, diagnostic plot of the estimated pi0 at different locations and the median estimate

Value

tpp

vector of tail posterior probabilities with parameter alpha, one per gene

FDR

(smoothed) estimate of FDR for all (distinct) cutoffs > p.cut

pi0

estimated proportion of observations under the null

pp0

simulations under the null

Author(s)

Natalia Bochkina

References

Bochkina N., Richardson S. (2007) Tail posterior probability for inference in pairwise and multiclass gene expression data. Biometrics. http://www.blackwell-synergy.com/doi/abs/10.1111/j.1541-0420.2006.00807.x

See Also

FDRplotTailPP,histTailPP,EstimatePi0

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 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)
 histTailPP(tpp.res)
 FDRplotTailPP(tpp.res, plot.TP = TRUE)

BGmix documentation built on Nov. 8, 2020, 4:54 p.m.