obtainResi:
Replace expression levels by the residuals of
regression analysis to remove the confounding effects.
Description
Replace expression levels by the residuals of regression analysis
in which predictor of interest is not in the regression model.
The purpose of this function is to remove potential confounding factors.
Usage
obtainResi(es, fmla)
Arguments
es
An ExpressionSet
object.
fmla
A formula object that specifies the covariates of the linear
regression model. The variable of interest should not be
included. No response variable should be specified in fmla
since
the response variable is always the expression level. See
function lmFit
of R Bioconductor package limma
.
Value
An ExpressionSet object with expression levels replaced by
residuals of linear regression analysis.
Details
To remove confounding effects, we can replace the expression level by
the residuals
of a linear regression model with
response variable the expression level and covariates the potential
confounders. The functions lmFit
and eBayes
will
be used to obtain regression coefficients.