Learn R Programming

Shrinkage (version 1.0)

nIC.est: Estimators based on model selection criteria.

Description

Estimators based on a model selection criteria: Bayes factor, Akaike information or Bayesian information criteria.

Usage

nIC.est(x, y = NULL, opt = c('BF','AIC','BIC'), param0 = NULL, param = NULL, logx = TRUE, ...)
nBF_estimator(x, y = NULL, param0 = NULL, param = NULL, logx = TRUE, ...)
nAICc_estimator(x, y = NULL, param0 = NULL, param = NULL, logx = TRUE, ...)
nBIC_estimator(x, y = NULL, param0 = NULL, param = NULL, logx = TRUE, ...)

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:
"BIC"
estimator based on the Bayesian information criterion (BIC). Equivalent function: nBIC_estimator

"AIC"
estimator based on the Akaike information criterion corrected for small samples (AICc). Equivalent function: nAICc_estimator

"BF"
estimator based on the Bayes factor (BF). Equivalent function: nBF_estimator.

param
Numeric vector, the effect-size of the parameter of interest. If input param = NULL, it is internally computed from the input matrices x and y if they are given.
param0
Value of the effect-size of the parameter of interest corresponding to the null hypothesis (null value)(i.e. log fold change corresponding to no change, usually 0). If input param0 = NULL, it is internally set.
logx
If logx = TRUE (and param = NULL and param0 = NULL), param is computed internally considering that input matrices x and y are logarithms and thus param0 is set to 0.
...
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

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<-5         #number of individuals
nfeat<-6        #number of features (metabolites, genes,...)
diffs<-c(1,4)   #features with differential log-abundance levels
lfc<-5          #differential quantity

# create xprnSet, xprnSetPair and numeric objects:
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

# examples: ----------
z1 <- nIC.est(x=x,opt='BIC')
z2 <- nIC.est(x=x,opt='BF')   
z3 <- nIC.est(x=x,opt='AIC') 
z4 <- nIC.est(x=x,y=y,opt='BIC')
z5 <- nIC.est(x=x,y=y,opt='BF')   
z6 <- nIC.est(x=x,y=y,opt='AIC') 

Run the code above in your browser using DataLab