contrasts.fit(limma)
contrasts.fit()所属R语言包:limma
Compute Contrasts from Linear Model Fit
从线性模型拟合计算对比
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given a linear model fit to microarray data, compute estimated coefficients and standard errors for a given set of contrasts.
由于微阵列数据的线性模型拟合,计算估计系数和标准误差为给定的一组对比。
用法----------Usage----------
contrasts.fit(fit, contrasts=NULL, coefficients=NULL)
参数----------Arguments----------
参数:fit
an MArrayLM object or a list object produced by the function lm.series or equivalent. Must contain components coefficients and stdev.unscaled.
MArrayLM对象或功能lm.series或同等学历产生一个列表对象。必须包含组件coefficients和stdev.unscaled。
参数:contrasts
numeric matrix with row corresponding to coefficients in fit and columns containing contrasts. May be a vector if there is only one contrast.
fit“列含有对比系数相应行的数字矩阵。可能是一个向量,如果只有一个对比。
参数:coefficients
vector indicating which coefficients are to be kept in the revised fit object. An alternative way to specify the contrasts.
向量表示该系数保持在修订后的合适对象。另一种方式来指定contrasts。
Details
详情----------Details----------
This function accepts input from any of the functions lmFit, lm.series, mrlm, gls.series or lmscFit. The function re-orientates the fitted model object from the coefficients of the original design matrix to any set of contrasts of the original coefficients. The coefficients, unscaled standard deviations and correlation matrix are re-calculated in terms of the contrasts.
这个函数接受任何功能的输入lmFit,lm.series,mrlm,gls.series或lmscFit。功能重新定位拟合模型对象从原设计矩阵系数的任何原系数的一组对比。非标度的标准差和相关矩阵系数,重新计算对比。
The idea of this function is to fit a full-rank model using lmFit or equivalent, then use contrasts.fit to obtain coefficients and standard errors for any number of contrasts of the coefficients of the original model. Unlike the design matrix input to lmFit, which normally has one column for each treatment in the experiment, the matrix contrasts may have any number of columns and these are not required to be linearly independent. Methods of assessing differential expression, such as eBayes or classifyTestsF, can then be applied to fitted model object.
此功能的想法是,以适应满秩的模型,使用lmFit或同等学历,然后使用contrasts.fit获得任意数量的原始模型系数的对比系数和标准误差。不像lmFit,通常有一列,每处理实验设计矩阵输入,矩阵contrasts可能有任何的列数,这些都不是线性独立。评估差异表达的方法,如eBayes或classifyTestsF,然后可以应用于拟合模型对象。
The coefficients argument provides a simpler way to specify the contrasts matrix when the desired contrasts are just a subset of the original coefficients.
coefficients参数指定contrasts矩阵时所需的反差是原来的系数只是一个子集提供了一个简单的方法。
Warning. For efficiency reasons, this function does not re-factorize the design matrix for each probe. A consequence is that, if the design matrix is non-orthogonal and the original fit included quality weights or missing values, then the unscaled standard deviations produced by this function are approximate rather than exact. The approximation is usually acceptable. The results are always exact if the original fit was a oneway model.
警告。出于效率的原因,这个函数不重新因式分解为每个探针的设计矩阵。一个后果是,如果设计矩阵的非正交和原来的适合包括优质的重量或遗漏值,然后由这个函数产生的非标度的标准偏差,而不是确切的近似。逼近通常是可以接受的。结果总是准确的,如果原来的契合是一个单向的模型。
值----------Value----------
An list object of the same class as fit, usually MArrayLM. This is a list with components
一个相同的类的fit,通常是MArrayLM的列表对象。这是一个组件列表
参数:coefficients
numeric matrix containing the estimated coefficients for each contrast for each probe.
数字矩阵的估计系数为每个每个探针的对比。
参数:stdev.unscaled
numeric matrix conformal with coef containing the unscaled standard deviations for the coefficient estimators.
数字矩阵形与coef含有非标度系数估计的标准偏差。
参数:<code>cov.coefficients</code>:
numeric matrix giving the unscaled covariance matrix of the estimable coefficients
数字matrix非标度的难能可贵系数的协方差矩阵
参数:...
any other components input in fit
fit任何其他组件输入
作者(S)----------Author(s)----------
Gordon Smyth
参见----------See Also----------
An overview of linear model functions in limma is given by 06.LinearModels.
线性模型功能概述limma由06.LinearModels给出。
举例----------Examples----------
# Simulate gene expression data: 6 microarrays and 100 genes[模拟基因表达数据:6芯片和100个基因]
# with one gene differentially expressed in first 3 arrays[同一个基因的差异表达在第3个数组]
M <- matrix(rnorm(100*6,sd=0.3),100,6)
M[1,1:3] <- M[1,1:3] + 2
# Design matrix corresponds to oneway layout, columns are orthogonal[设计矩阵对应的单向布局,列正交]
design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1))
fit <- lmFit(M,design=design)
# Would like to consider original two estimates plus difference between first 3 and last 3 arrays[要考虑原来的两个估计,加上第3和最后3个数组之间的差异]
contrast.matrix <- cbind(First3=c(1,0),Last3=c(0,1),"Last3-First3"=c(-1,1))
fit2 <- contrasts.fit(fit,contrast.matrix)
fit2 <- eBayes(fit2)
# Large values of eb$t indicate differential expression[EB $ T大值表示差异表达]
results <- classifyTestsF(fit2)
vennCounts(results)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|