Learn R Programming

Shrinkage (version 1.0)

other.est: Other shrinkage estimators.

Description

Other shrinkage estimators.

Usage

other.est(x, y = NULL, opt = c("limma","pseudo","lfdr0","lfdr1"), pval.fun = t.test, alternative = "greater", arglis.pvalfun = list(), ...)
npseudo.est(x, y = NULL, ...)
nlimma.est(x, y = NULL, ...)
nlfdr0.est(x, y = NULL, pval.fun = t.test, alternative = "greater", arglis.pvalfun = list(), ...)
nlfdr1.est(x, y = NULL, pval.fun = t.test, alternative = "greater", arglis.pvalfun = list(), ...)

Arguments

x
Input data matrix: features(rows) x samples (columns). See examples.
y
Optional input data matrix.
opt
Option for selecting the type of estimator, it is a character:
"locfdr0"
estimator based on the local false discovery rate (LFDR) with theoretical null (null hypothesis distribution follows N(0,1)). Equivalent function: nlfdr0.est.

"locfdr1"
estimator based on the local false discovery rate (LFDR) with empiricalical null (null hypothesis distribution estimated from data). Equivalent function: nlfdr1.est.

"limma"
estimator based on the raw p-value that controls test-wise error rate (TWER). Equivalent function: nlimma.est

"pseudo"
estimator based on the adjusted p-value that controls family-wise error rate (FWER). Equivalent function: npseudo.est

pval.fun
Function to compute p-values from the input data. Usually: "t.test", "wilcox.test", etc.
alternative
Argument for input function pval.fun, type of p-values to be computed: "less", "greater", "two-sided" (see stats R package).
arglis.pvalfun
Further arguments to pass to input function pval.fun (see stats R package).
...
Further arguments to pass to internal an function.

Value

A vector of length equal to the total number of features (i.e. proteins, genes,...).

References

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.

Examples

Run this code
#simulate some data sets: matrices of log-abundance levels
nsam<-25         #number of individuals
nfeat<-50        #number of features (metabolites, genes,...)
diffs<-c(1,4)   #features with differential log-abundance levels
lfc<-5          #differential quantity

# create data sets:
x <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #case
y <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #control
x[diffs,] <- x[diffs,] + lfc

# moderated t-stat estimators: ----------

z1 <- other.est (x=x,y=y,opt="limma")         
z2 <- other.est (x=x,y=y,opt="pseudo")
z3 <- other.est (x=x,y=y,opt="lfdr0",pval.fun="t.test") 


Run the code above in your browser using DataLab