The core of this package is the fitting of gene-wise linear models to microarray data. The basic idea is to estimate log-ratios between two or more target RNA samples simultaneously. See the LIMMA User's Guide for several case studies.
lmFit.
This is recommended interface for most users.
lmFit produces a fitted model object of class MArrayLM containing coefficients, standard errors and residual standard errors for each gene.
lmFit calls one of the following three functions to do the actual computations: lm.series mrlm lm.series using robust regression as implemented by the rlm function in the MASS package.gls.series duplicateCorrelation is used to estimate the inter-duplicate or inter-block correlation before using gls.series.link{getEAW} to extract data from microarray data objects, and unwrapdups which provides an unified method for handling duplicate spots.lmFit has two main arguments, the expression data and the design matrix.
The design matrix is essentially an indicator matrix which specifies which target RNA samples were applied to each channel on each array.
There is considerable freedom in choosing the design matrix - there is always more than one choice which is correct provided it is interpreted correctly. Design matrices for Affymetrix or single-color arrays can be created using the function model.matrix which is part of the R base package.
The function modelMatrix is provided to assist with creation of an appropriate design matrix for two-color microarray experiments.
For direct two-color designs, without a common reference, the design matrix often needs to be created by hand.makeContrasts may be used to form a contrast matrix to make comparisons of interest.
The fit and the contrast matrix are used by contrasts.fit to compute fold changes and t-statistics for the contrasts of interest.
This is a way to compute all possible pairwise comparisons between treatments for example in an experiment which compares many treatments to a common reference.eBayes or treat.
ebayes is an older version of eBayes.
A moderated t-statistic and a log-odds of differential expression is computed for each contrast for each gene.
treat tests whether log-fold-changes are greater than a threshold rather than merely different to zero. eBayes and eBayes use internal functions squeezeVar, fitFDist, tmixture.matrix and tmixture.vector. The function zscoreT is sometimes used for computing z-score equivalents for t-statistics so as to place t-statistics with different degrees of freedom on the same scale.
zscoreGamma is used the same way with standard deviations instead of t-statistics.
These functions are for research purposes rather than for routine use.toptable or topTable topTableF volcanoplotplotlineswrite.fit MarrayLM object to a file.
Note that if fit is an MArrayLM object, either write.fit or write.table can be used to write the results to a delimited text file.selectModel provides a means to choose between alternative linear models using AIC or BIC information criteria.Smyth, G. K., Michaud, J., and Scott, H. (2005). The use of within-array replicate spots for assessing differential expression in microarray experiments. Bioinformatics 21(9), 2067-2075.