Learn R Programming

pi0 (version 1.4-1)

CBUM: (Censored) Beta-Uniform mixture for p-values

Description

This function implements the method of Markitsis and Lai (2010).

Usage

CBUM(p, start.pi0=0.5, thresh.censor=0.05, eps=1e-5, niter=Inf, verbose=FALSE)

Arguments

p

a numeric vector the p-values

start.pi0

numeric scalar, starting value of pi0 for EM algorithm.

thresh.censor

numeric scalar, the threshold of censoring. If isTRUE(lambda<min(p)), this is equivalent to the BUM method of Pounds and MOrris (2003).

eps

numeric scalar, maximum tolerable absolute difference of parameter estimates for successive iterations in the EM algorithm.

niter

numeric scalar, maximum number of EM iterations.

verbose

logical scalar, indicating whether excessive outputs will be printed during EM algorithm.

Value

A numeric scalar, being the proportion pi0 of true null hypotheses. The result has a class 'CBUM', with the following attributes:

converged

logical, convergence status.

iter

numeric, number of iterations.

call

the match.call() result.

alpha

estimated alpha parameter for the beta component.

lfdr

numeric vector estimated local false discovery rates, if thresh.censor<min(p); NULL, otherwise

thresh.censor

the censoring threshold for p-values.

Details

This function is an improved version of the CBpi0 function available at http://home.gwu.edu/~ylai/research/CBpi0/CBpi0.txt, which implements the censored (1-paramater beta)-uniform mixture model to a large number of p-values.

References

Anastasios Markitsis and Yinglei Lai (2010) A censored beta mixture model for the estimation of the proportion of non-differentially expressed genes. Bioinformatics 26(5):640-646.

See Also

qvalue, histf1

Examples

Run this code
# NOT RUN {
set.seed(99722)
p=c(runif(3500), rbeta(1500, .8, 2.2))
CBUM(p)
# }

Run the code above in your browser using DataLab