Description Usage Arguments Value Note Author(s) References See Also Examples
Wrapper of Efrons LFDR (here called Histogram-based estimator (HBE)) with empirical estimation of the null hypothesis distribution (HBEE): lfdr.empiricalNull
(nulltype=1 by default)
or with assumed theoretical null hypothesis distribution as N(0,1) (HBEA): lfdr.assumedNull
.
1 2 3 4 |
stat |
Input numeric vector of statistics. At least one of the inputs (pvalue or stat) must be non null. |
pvalue |
Optional input numeric vector of p-values. At least one of the inputs (pvalue or stat) must be non null. If the non empty input is a vector of p-values, the function qnorm is applied to it (see manual of package |
nulltype |
Parameter for selection of the type of null hypothesis distribution in Efrons method. The value nulltype = 1 is the default in |
bre |
Number of breaks in the discretization of the z-score axis in Efrons method (see package |
df |
Degrees of freedom for fitting the estimated density f(z) in Efrons method (see package |
plot |
Optional. If plot = 0, no plots are made (see package |
... |
Further arguments to pass to function |
A list with:
LFDR.hat |
Vector of estimates of the HBE. |
p0.hat |
Estimated proportion of affected features p0 (null hypothesis). |
stat |
Input vector of statistics. |
info |
Method name and information about computation failure. |
Functions lfdr.assumedNull
and lfdr.empirical
are based on function locfdr
from package locfdr
(v1.1.7). See references.
If computation fails for all features, p0.hat
is set to NA and LFDR.hat
is set to a vector of NA with lenght equal to the number of features. If it fails for a given feature, only the resulting LFDR for that feature is set to NA. Error messages are not suppressed.
Code: David R. Bickel and Marta Padilla (modifications).
Documentation: Alaa Ali, Kyle Leckett, Marta Padilla.
Authors of R package locfdr
on which these functions are based: Bradley Efron, Brit B. Turnbull, Balasubramanian Narasimhan.
Efron, B., Turnbull, B. B., & Narasimhan, B. (2011). locfdr: Computes local false discovery rates. Retrieved from http://cran.r-project.org/src/contrib/Archive/locfdr/
lfdr.elfdr
, locfdr
function and package, and R package splines
.
1 2 3 4 5 6 7 | # a statistic vector with missing elements
ss <- runif(55,-1,5) ;ss[c(13,2,5)]<-NA
# a p-values vector with missing elements
pp <- runif(55) ;pp[c(13,2,5)]<-NA
z1 <- lfdr.assumedNull(stat = ss, df = 3)
z2 <- lfdr.empiricalNull(pvalue = pp, df=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.