pamr.batchadjust {pamr} | R Documentation |
A function to mean-adjust microarray data by batches
Description
A function to mean-adjust microarray data by batches
Usage
pamr.batchadjust(data)
Arguments
data |
The input data. A list with components: x- an expression genes in the rows, samples in the columns, and y- a vector of the class labels for each sample, and batchlabels- a vector of batch labels for each sample. |
Details
pamr.batchadjust
does a genewise one-way ANOVA adjustment for
expression values. Let be the expression for gene
in sample
.
Suppose sample
in in batch
, and let
be the set of all samples in batch
. Then
pamr.batchadjust
adjusts to
where the mean is taken over all samples
in
.
Value
A data object of the same form as the input data, with x replaced by the adjusted x
Author(s)
Trevor Hastie,Robert Tibshirani, Balasubramanian Narasimhan, and Gilbert Chu
Examples
suppressWarnings(RNGversion("3.5.0"))
set.seed(120)
#generate some data
x <- matrix(rnorm(1000*20),ncol=20)
y <- sample(c(1:4),size=20,replace=TRUE)
batchlabels <- sample(c(1:5),size=20,replace=TRUE)
mydata <- list(x=x,y=factor(y),batchlabels=factor(batchlabels))
mydata2 <- pamr.batchadjust(mydata)
[Package pamr version 1.57 Index]