dBUMfit: Function to fit a p-value distribution under beta-uniform...

Description Usage Arguments Value Note See Also Examples

View source: R/dBUMfit.r

Description

dBUMfit is supposed to take as input a vector of p-values for deriving their distribution under beta-uniform mixture model (see Note below). The density distribution of input p-values is expressed as a mixture of two components: one for the null hypothesis (the noise component) and the other for the alternative hypothesis (the signal component). The noise component is the uniform density, while the signal component is the remainder of the mixture distribution. It returns an object of class "BUM".

Usage

1
dBUMfit(x, ntry = 1, hist.bum = T, contour.bum = T, verbose = T)

Arguments

x

a vector containing input p-values

ntry

an integeter specifying how many trys are used to find the optimised parameters by maximum likelihood estimation

hist.bum

logical to indicate whether the histogram graph should be drawn

contour.bum

logical to indicate whether a contour plot should be drawn to show the log likelihood as a function of two parameters (a and lambda) in the beta-uniform mixture model

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display

Value

an object of class "BUM", a list with following elements:

Note

The probability density function of p-values under the Beta-Uniform Mixture model is formulated as: f(x|λ,a) = λ + (1-λ)*a*x^{a-1}. The model names after mixing two distributions:

Both are mixed via λ. The mixture parameter λ measures the contribution from the uniform distribution. Accordingly, 1-λ measures the contribution from the beta distribution. Notably, the probability density function of the beta distribution can be splitted into two parts (rather than the exclusitive signal):

In other words, there is no signal at x=1 but all being noise. It is a conservative, upper bound estimation of the noise. Therefore, the probability density function in the model can be decomposed into signal-noise components:

It is misleading to simply view λ as the noise component and (1-λ)*a*x^{a-1} as the signal component, just as wrongly do in the literatures (e.g. http://www.ncbi.nlm.nih.gov/pubmed/18586718)

See Also

dBUMscore

Examples

1
2
3
4
5
6
7
# 1) generate an vector consisting of random values from beta distribution
x <- rbeta(1000, shape1=0.5, shape2=1)

# 2) fit a p-value distribution under beta-uniform mixture model
fit <- dBUMfit(x)
fit$lambda
fit$a

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: supraHex
Loading required package: hexbin
	A total of p-values: 1000
	Maximum Log-Likelihood: 352.7
	Mixture parameter (lambda): 0.112
	Shape parameter (a): 0.449
dev.new(): using pdf(file="Rplots1.pdf")
[1] 0.1117863
[1] 0.4493965

dnet documentation built on Feb. 20, 2020, 3:01 p.m.

Related to dBUMfit in dnet...