dBUMscore: Function to transform p-values into scores according to the...

Description Usage Arguments Value Note See Also Examples

View source: R/dBUMscore.r

Description

dBUMscore is supposed to take as input a vector of p-values, which are transformed into scores according to the fitted beta-uniform mixture model. Also if the FDR threshold is given, it is used to make sure that p-values below this are considered significant and thus scored positively. Instead, those p-values above the given FDR are considered insigificant and thus scored negatively.

Usage

1
dBUMscore(fit, method = c("pdf", "cdf"), fdr = NULL, scatter.bum = T)

Arguments

fit

an object of class "BUM"

method

the method used for the transformation. It can be either "pdf" for the method based on the probability density function of the fitted model, or "cdf" for the method based on the cumulative distribution function of the fitted model

fdr

the given FDR threshold. By default, it is set to NULL, meaning there is no constraint. If given, those p-values with the FDR below this are considered significant and thus scored positively. Instead, those p-values with the FDR above this given FDR are considered insigificant and thus scored negatively

scatter.bum

logical to indicate whether the scatter graph of scores against p-values should be drawn. Also indicated is the p-value (called tau) corresponding to the given FDR threshold (if any)

Value

Note

The transformation from the input p-value x to the score S(x) is based on the fitted beta-uniform mixture model with two parameters λ and a: f(x|λ,a) = λ + (1-λ)*a*x^{a-1}. Specifically, it considers the log-likelyhood ratio between the signal and noise compoment of the model. The probability density function (pdf) of the signal component and the noise component are (1-λ)*a*(x^{a-1}-1) and λ + (1-λ)*a, respectively. Accordingly, the cumulative distribution function (cdf) of the signal component and the noise component are \int_0^x (1-λ)*a*(x^{a-1}-1) \, \mathrm{d}x and \int_0^x λ+(1-λ)*a \, \mathrm{d}x. In order to take into account the significance of the p-value, the fdr threshold is also used for down-weighting the score. According to how to measure both components, there are two methods implemented for deriving the score S(x):

See Also

dBUMfit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

# 3) calculate the scores according to the fitted BUM and fdr=0.01
# using "pdf" method
scores <- dBUMscore(fit, method="pdf", fdr=0.01)
# using "cdf" method
scores <- dBUMscore(fit, method="cdf", fdr=0.01)

hfang-bristol/dnet documentation built on Feb. 23, 2020, 2:06 p.m.