Learn R Programming

Shrinkage (version 1.0)

nscottberger.est: Scott-Berger estimator.

Description

Estimator that implements a slightly altered version of the model of Scott and Berger (see references).

Usage

nscottberger.est(x, y = NULL, scaled = F, ...)

Arguments

x
Input data matrix: features(rows) x samples (columns). See examples.
y
Optional input data matrix.
scaled
Logical.
...
Further arguments to pass to an internal function.

Value

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

References

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.

James G. Scott and James O. Berger, "An exploration of aspects of Bayesian multiple testing", J. Stat. Plan. Inf., 136, 2133-2162, 2006

Examples

Run this code
#simulate some data sets: matrices of log-abundance levels
nsam<-10        #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(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #case
y <- matrix(runif(nfeat*nsam), nrow = nfeat, ncol = nsam) #control
x[diffs,] <- x[diffs,] + lfc

# scottberger estimator: ----------
z1 <- nscottberger.est(x=x)          
z2 <- nscottberger.est(x=x,y=y)

Run the code above in your browser using DataLab