Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lm.series

Fit Linear Model to Microrray Data by Ordinary Least Squares


Description

Fit a linear model genewise to expression data from a series of arrays. This function uses ordinary least squares and is a utility function for lmFit.

Usage

lm.series(M,design=NULL,ndups=1,spacing=1,weights=NULL)

Arguments

M

numeric matrix containing log-ratio or log-expression values for a series of microarrays, rows correspond to genes and columns to arrays

design

numeric design matrix defining the linear model. The number of rows should agree with the number of columns of M. The number of columns will determine the number of coefficients estimated for each gene.

ndups

number of duplicate spots. Each gene is printed ndups times in adjacent spots on each array.

spacing

the spacing between the rows of M corresponding to duplicate spots, spacing=1 for consecutive spots

weights

an optional numeric matrix of the same dimension as M containing weights for each spot. If it is of different dimension to M, it will be filled out to the same size.

Details

This is a utility function used by the higher level function lmFit. Most users should not use this function directly but should use lmFit instead.

The linear model is fit for each gene by calling the function lm.fit or lm.wfit from the base library.

Value

A list with components

coefficients

numeric matrix containing the estimated coefficients for each linear model. Same number of rows as M, same number of columns as design.

stdev.unscaled

numeric matrix conformal with coef containing the unscaled standard deviations for the coefficient estimators. The standard errors are given by stdev.unscaled * sigma.

sigma

numeric vector containing the residual standard deviation for each gene.

df.residual

numeric vector giving the degrees of freedom corresponding to sigma.

qr

QR-decomposition of design

Author(s)

Gordon Smyth

See Also

An overview of linear model functions in limma is given by 06.LinearModels.

Examples

# See lmFit for examples

limma

Linear Models for Microarray Data

v3.46.0
GPL (>=2)
Authors
Gordon Smyth [cre,aut], Yifang Hu [ctb], Matthew Ritchie [ctb], Jeremy Silver [ctb], James Wettenhall [ctb], Davis McCarthy [ctb], Di Wu [ctb], Wei Shi [ctb], Belinda Phipson [ctb], Aaron Lun [ctb], Natalie Thorne [ctb], Alicia Oshlack [ctb], Carolyn de Graaf [ctb], Yunshun Chen [ctb], Mette Langaas [ctb], Egil Ferkingstad [ctb], Marcus Davy [ctb], Francois Pepin [ctb], Dongseok Choi [ctb]
Initial release
2020-10-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.