ber (version 4.0)

ber: Batch Effects Removal

Description

Batch effects are removed using a two-stage regression approach.

Usage

ber(Y, b, covariates = NULL)

Arguments

Y
A matrix with $n$ rows and $g$ columns, where $n$ is the number of objects and $g$ is the number of variables. In the case of gene expression data, columns correspond to genes (probe sets) and rows to samples.
b
A vector of class factor with the element in position $i$ ($i=1,\ldots,n$) representing the batch from which observation $i$ belongs to.
covariates
An object of class data.frame where each column corresponds to a quantitative variable (of class numeric) or a qualitative variable (of class factor).

Value

$n$ rows and $g$ columns.

Details

In this implementation NA values are not allowed.

References

M. Giordan. February 2013. A Two-Stage Procedure for the Removal of Batch Effects in Microarray Studies. Statistics in Biosciences.

See Also

ber_bg, combat_np, combat_p,mean_centering, standardization

Examples

Run this code
Y<-matrix(rnorm(6000),nrow=12)
class<-gl(2,6,labels=c("Control","Treat"))
class<-data.frame(class)
batch<-rep(gl(2,3,labels=c("Batch1","Batch2")),2)
YEadj<-ber(Y,batch,class)

Run the code above in your browser using DataLab