BGmix (version 1.32.0)

TailPP: Tail posterior probability for BGmix output.

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

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

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

Run this code

 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)

Run the code above in your browser using DataCamp Workspace