Description Usage Arguments Value Note Author(s) References See Also Examples
Shrinkage estimator based on Efrons local false discovery rate (LFDR).
1 2 3 4 5 6 7 8 9 10 | nlocfdr.est(x.stat = NULL, y.pvalue = NULL, pval.fun = t.test, arglis.pvalfun = list(),
alternative = "greater", param = NULL, param0 = NULL, logx = TRUE, nulltype = 0,
q.norm = T, ...)
nlocfdr.x(x = NULL, y = NULL, pval.fun = t.test, arglis.pvalfun = list(),
alternative = "greater", param = NULL, param0 = NULL, logx = TRUE, nulltype = 0,
q.norm = T, ...)
nlocfdr.stat(stat = NULL, pvalue = NULL, param = NULL, param0 = 0, nulltype = 0,
q.norm = T, ...)
|
x.stat |
Input data matrix (features (rows) x samples (columns)) or numeric vector of statistics for the general function |
y.pvalue |
Optional input data matrix or numeric vector of pvalues for the general function |
x |
Input data matrix: features (rows) x samples (columns) for function |
y |
Optional input data matrix for function |
stat |
Input (numeric) vector of statistics for function |
pvalue |
Input (numeric) vector of pvalues for function |
pval.fun |
Function to compute p-values from the input data. Usually: "t.test", "wilcox.test", etc. |
alternative |
Argument for input function |
arglis.pvalfun |
Further arguments for the input function |
param |
Numeric vector as the parameter of interest (effect-size). If input |
param0 |
Null value of the parameter of interest (i.e. log fold change corresponding to no change, usually 0). If input |
logx |
If |
nulltype |
Parameter for selection of the type of null hypothesis distribution in Efrons method (package
|
q.norm |
If |
... |
Further arguments to pass to function |
A vector of length equal to the total number of features (i.e. proteins, genes,...).
when stat
is empty (or q.norm = TRUE
), the vector stat
is internally computed by qnorm(pvalue)
if pvalue
is available.
When inputs param
and/or param0
are not given, they are computed internally from matrices x
and y
.
If logx = TRUE
then param
= \bar{x} - \bar{y} and param0
is set to 0, while if logx = FALSE
then param
= \bar{x} / \bar{y} and param0
is set to 1.
Function nlocfdr.stat
needs inputs param
and param0
.
Code: Corey M. Yanofsky, Zahra Montazeri, David R. Bickel and Marta Padilla (modifications)
Documentation: Alaa Ali and Marta Padilla
Yanofsky, C. M., & Bickel, D. R. (2010). Validation of differential gene expression algorithms: Application comparing fold-change estimation to hypothesis testing. BMC Bioinformatics, 11, 63.
Montazeri, Z., Yanofsky, C. M., & Bickel, D. R. (2010). Shrinkage estimation of effect sizes as an alternative to hypothesis testing followed by estimation in high-dimensional biology: Applications to differential gene expression. Statistical Applications in Genetics and Molecular Biology, 9, 23.
Function and package locfdr
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #simulate some data sets: matrices of log-abundance levels
nsam<-20 #number of individuals
nfeat<-40 #number of features (metabolites, genes,...)
diffs<-c(1:4) #features with differential log-abundance levels
lfc<-5 #differential quantity
# create data sets:
x <- matrix(rnorm(nfeat*nsam), nrow = nfeat, ncol = nsam) #case
y <- matrix(rnorm(nfeat*nsam), nrow = nfeat, ncol = nsam) #control
x[diffs,] <- x[diffs,] + lfc
stat<-rnorm(nfeat) #a vector of statistics
stat[diffs]<-stat[diffs]+lfc
# shrinkage estimator ----------
z1 <- nlocfdr.stat(stat=stat,param=rowMeans(x))
z2 <- nlocfdr.x(x=x,y=y,pval.fun="wilcox.test",nulltype=1,df=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.