Learn R Programming

dnet (version 1.0.0)

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

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

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:
    • lambda: estimated mixture parameter
  • a: estimated shape parameter
  • NLL: Negative log-likelihood
  • pvalues: the input pvalues
  • call: the call that produced this result

eqn

$(1-\lambda)*a*x^{a-1}$

itemize

  • the signal component:$(1-\lambda)*a*(x^{a-1}-1)$

item

  • the rest part as signal: $a*(x^{a-1}-1)$
  • the noise component: $\lambda + (1-\lambda)*a$

url

http://www.ncbi.nlm.nih.gov/pubmed/18586718

See Also

dBUMscore

Examples

Run this code
# 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

Run the code above in your browser using DataLab