找回密码
 注册
查看: 628|回复: 0

R语言 maanova包 fitmaanova()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 23:55:09 | 显示全部楼层 |阅读模式
fitmaanova(maanova)
fitmaanova()所属R语言包:maanova

                                        Fit ANOVA model for Micro Array experiment
                                         适合微阵列实验的方差分析模型

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This is the function to fit the ANOVA model for Microarray experiment. Given the data and formula, this function fits the regression model for each gene and calculates the ANOVA estimates, variance components for random terms, fitted values, etc. For a mixed effect models, the output estimates will be BLUE and BLUP.
这是适合微阵列实验的方差分析模型的功能。给出的数据和公式,此功能适合每个基因的回归模型和混合效应模型计算方差估计,随机项方差分量,拟合值等,产量估计将是蓝色和BLUP法。

All terms used in the formula should be corresponding to the factor names in designfile except "Spot" and "Label". "Spot" represents the spotting effect and "Label" represents the labeling effects. They are from the within slide technical replicates. If there is no replicated spots, These two terms cannot be fitted. Also these two terms cannot be fitted for one-dye system (e.g., Affymetrix arrays). (Note that Dye effect should not be fitted in one-dye system).
在公式中使用的所有术语应该是“点”和“标签”除外对应designfile因子名称。 “点”代表发现效果和“标签”,代表了标签效应。他们是从幻灯片技术内的复制。如果有没有复制斑点,这两个条件不能安装。这两个方面也不能安装一个染料系统(例如,Affymetrix公司的阵列)。 (注意染料的影响不应该被安装在一个染料系统)。

A typical formula will be like "~Array+Dye+Sample", which means you want to fit Array, Dye and Sample effect in the ANOVA model. In this case, you need to have Array, Dye and Sample columns in your input design file. Make sure you have enough degree of freedom when making a model. Also you need to be careful about confounding problem.
一个典型的公式会像“~阵列+染料+样品”,这意味着你要适合在方差分析模型的阵列,染料和样品效果。在这种情况下,你需要有阵列,染料和样品列在您的输入设计文件。模型时,确保你有足够的自由程度。你也需要小心混杂问题。

If you have multiple factors in your experiment, you can specify the main and interaction effect in the formula. At this time, only two-way interactions are allowed.
如果你有多种因素在实验中,你可以指定公式中的主体和互动的效果。在这个时候,只有双向互动是允许的。

When you have random or covariate effect they should be specified in the 'random' and 'covariate', and also in the formula.
当你有随机或协的作用,他们应在“随机”和“协”,公式中的指定。

For most mixed effect models, Array should be treated as random factor. Sample should be treated as random if you have biological replicates. Note that the reference sample (0's in Sample) will always be treated as fixed even if you specify Sample as random.
对于大多数混合效应模型,阵列应被视为随机因素。样品应视为随机的,如果你有生物复制。注意将永远被视为参考样本(0样品)作为固定的,即使你指定的随机抽样。

Note that the calculation could be very slow for mixed effect models. The computational time depends on the number of genes, number of arrays and the size of the random variables (dimension of Z matrix).
请注意,混合效应模型计算可能很慢。计算时间的长短取决于基因的数量,阵列数量和大小的随机变量(Z矩阵维)。

Array specific covariate should be included in the design matrix, and gene specific covariate  should be read by 'covM' in read.madata(), and need to be specified in covariate term.
阵列的具体协变量应包括在设计矩阵,应读“covMread.madata()基因特定的协变量,需要协术语指定。


用法----------Usage----------


fitmaanova(madata, formula, random= ~1, covariate = ~1, mamodel,
           inits20,method=c("REML","ML","MINQE-I","MINQE-UI", "noest"),
           verbose=TRUE, subCol=FALSE)



参数----------Arguments----------

参数:madata
An object of class madata.
对象类madata。


参数:formula
The ANOVA model formula.
方差分析模型公式。


参数:random
The formula for random terms. ~1 means only the residual is random (fixed model). Note that all random terms should be in the ANOVA model formula.
随机计算公式。 ~1意味着只有残留是随机(固定模式)。请注意,所有随机的条款应在方差分析模型公式。


参数:covariate
The formula for covariates. ~1 means no covariates. The array specific covariates should be numeric values in the design matrix,  and the gene specific covariates should be read by covM in read.madata </table>
协变量的公式。 ~1意味着没有协变量。具体协变量的数组应该在设计矩阵的数值,特定基因变项应读取covMread.madata</ TABLE>


参数:mamodel
Inside arguments to save the calculation time.
里面的参数,以节省计算时间。


参数:inits20
The initial value for variance components. This should be a matrix with number of rows equals to the number of genes and number of columns equals to the number of random terms in the model. Good initial values will greatly speed up the calculation. If it is not given, it will be calculated based on the corresponding fixed model.
方差分量的初始值。这应该是一个矩阵的行数等于基因数和列数等于模型中随机数。良好的初始值将大大加快了计算。如果没有给出,它会计算相应的固定模式。


参数:method
The method used to solve the Mixed Model Equation. Available options includes: "ML" for maximum liklihood; "REML" for restricted maximum liklihood; "MINQE-I" and "MINQE-UI" are for minimum norm and "noest" for no estimate for variance component (use the initial value). Both "ML" and "REML" use method of scoring algorithm to solve MME iteratively. "noest" skips the iteration and will be significantly faster (but accurate). Default method is "REML". For details about fitting mixed effects models, read the "Fitting mixed Effects model" section.   
所采用的方法来解决混合模型方程。可用的选项包括:“毫升”最大似然; REML法“约束最大似然”MINQE我“和”MINQE UI的“最小范数和方差分量估计没有”noest“(使用初始值)。 “毫升”“REML法”的得分算法解决MME的反复使用方法。的“noest”,跳过迭代,将显着加快(但准确)。默认的方法是“REML法”。拟合的混合效应模型的详细信息,请阅读“拟合混合效应模型”一节。


参数:verbose
A logical value to indicate whether to display some message for calculation progress.
一个逻辑值,指明是否显示计算进度的一些消息。


参数:subCol
A logical value to indicate whether subtracting column mean from the raw data or not. Default is not subtracting column mean but for two color array it automatically subtracts the column mean.
逻辑值指示是否意味着从原始数据或不减去列。默认是不减去列的意思,但两种颜色阵列,它会自动减去列是什么意思。


值----------Value----------

It returns anova and anova.subcol. Depending on 'subCol' option, one field may not contain any information. Still it needs two fields to calculate Fss test statistics. anova and anova.subcol contains the same following fields.
返回anova和anova.subcol。根据subCol选项,一个字段可能不包含任何信息。尽管如此,它需要两个领域的计算FSS试验统计。 anova和anova.subcol包含以下领域相同。


参数:yhat
Fitted intensity value which has the same dimension as the input intensity data
合身的强度值具有相同维度的投入强度数据


参数:S2
Variance components for the random terms. It is a matrix with number of rows equals to the number of genes and number of columns equals to the number of random terms. Note that for fixed effect model, S2 is a one column vector for error's variance.
随机条件方差分量。这是一个矩阵的行数等于基因数和列数等于随机数。请注意,固定效应模型,S2是一个列向量误差的方差。


参数:G
Gene effects. A vector with the same length as the number of genes.
基因效应。与基因数目相同长度的向量。


参数:reference
The estimates for reference sample. If there is no reference sample specified in the design, this field will be absent in the output object.
参考样本的估计。如果没有在设计中指定的参考样本,这一领域将缺席在输出对象。


参数:S2.level
A list of strings to indicate the order of the S2 field. Note that the last column of S2 is always the error's variance. S2.level is only for the non-error terms. For example, if there are three columns in S2 and S2.level is c("Strain", "Diet"), then the three columns of S2 correspond to the variances of Strain, Diet and error respectively for each gene.  
一个字符串列表,表明在S2场秩序。需要注意的是S2的最后一列永远是错误的方差。 s2.level是唯一的非错误。例如,如果有三个列在S2和S2.level是c(“应变”,“饮食”),然后S2的三列对应的应变,饮食和错误的方差分别为每一个基因。


参数:Others
Estimates (or BLUE/BLUP for mixed effect model) for the terms in model. There will be XXX.level field for each term representing the order of the estimates (similar to S2.level).
估计模型中的条款(或蓝/混合效应模型BLUP法)。每个任期(类似以S2.level)为了估计会有XXX.level领域。


参数:flag
A vector to indicate whether there is bad spot for this  gene. 0 means no bad spot and 1 means has bad spot. If there is no flag information in input data, this field will not be available.
一个向量,以表明该基因是否有坏点。 0意味着没有坏点和1表示有坏点。如果没有输入数据的标志信息,这一领域将无法使用。


参数:model
The model object used for this fitting.
用于此拟合模型对象。


拟合模型的混合效应----------Fitting mixed Effects model----------

Fitting mixed effects models needs a lot of computation. A good starting value for the variances is very important. This function first treats all random factors as fixed and fits a fixed effects model. Then variances for random factors are calculated and used as the initial values for mixed effects model fitting.
拟合混合效应模型需要大量的计算。一个很好的起点差异的价值是非常重要的。这个函数首先将其视为固定的随机因素,适合固定效应模型。然后随机因素的差异计算和使用混合效应模型拟合的初始值。

There are several methods available for fitting the mixed effects model. "noest" does not really fit the mixed effects model. It takes the initial variance and solve mixed model equations to get the estimates (BLUE and BLUP). "MINQE-I" and "MINQE-UI" are based on minimum norm unbiased estimators. It is can be thought as a first iterate solution of "ML" and "REML", respectively. "ML" and "REML" are based on maximum likelihood and restricted maximum likelihood. Both of them need to be solved iteratively so they are very slow to compute. For "ML" and "REML", a MINQUE estimates is used as the starting value.  "Method of scoring" is used as the iteratively algorithm to solve ML and REML. "Method of scoring" algorithm is similar to New-Raphson method except that it uses the expected value of Hessian (second derivative matrix of the objective function) instead of Hessian itself. Method of scoring is more robust to poor starting values and the Hessian is easier to calculate than Newton-Raphson.
有几种方法拟合混合效应模型。 “noest”并不真正适合混合效应模型。它需要的初始方差和解决混合模型方程组,得到的估计(蓝色和BLUP法)。 MINQE一“和”MINQE UI的“基于最小范数的无偏估计。它可以被认为是“毫升”和“REML法”作为第一个迭代的解决方案,分别为。 “毫升”和“REML法”的基础上最大的可能性和限制最大似然。他们都需要解决的反复,所以他们都非常慢计算。为“毫升”和“REML法”,MINQUE估计是用来作为起始值。 “打分法”被用作迭代算法解决ML和REML。算法是类似的新Raphson法“计分法”,但它使用了Hessian的预期值(第二个目标函数的导数矩阵),而不是Hessian本身。评分的方法,是更强大的初始值差和Hessian是比牛顿 - 拉夫森容易计算。

For more mathematical details please read Searle et al.
对于更多的数学细节请阅读塞尔等。


作者(S)----------Author(s)----------


Hao Wu



参考文献----------References----------

expression microarrays, Genetical Research, 77:123-128.
microarray data, Journal of Computational Biology, 7:819-837.
and sons, Inc.

参见----------See Also----------

makeModel, matest
makeModel,matest


举例----------Examples----------


###################################[##################################]
# fixed model fitting[固定模型拟合]
###################################[##################################]
# load in abf1 data[在ABF1数据加载]
data(abf1)
## Not run: [#无法运行:]

# fit model with random effect[适合与随机效应模型]
fit.full.mix <- fitmaanova(abf1, formula = ~Strain+Sample,
   random = ~Sample)

# this is to explain the usage of including covariate variable.[这是解释包括协变量的使用。]
# .CEL file is not included in the package, thus use can not use this. [。CEL的文件不包含在包中,因此使用不能使用此。]
# array specific covariate : add it to the design matrix [阵列中的特定协:将它添加到设计矩阵]
beforeRma &lt;- ReadAffy() # suppose there are 18 arrays.[假设有18个阵列。]
rmaData <- rma(beforeRma)
datafile <- exprs(rmaData)
design.table=data.frame(Array=row.names(pData(beforeRma)))
Strain = rep(c('Aj', 'B6', 'B6xAJ'), each=6)
Sample = rep(c(1:9), each=2)
Cov1 = sample(1:100,18) # this is artificial example [这是人为的例子]
designfile.cov1 = cbind(design.table, Strain, Sample,Cov1)
data.cov1=read.madata(datafile, designfile=designfile.cov1)
fit.cov1 = fitmaanova(data.cov1,formula = ~Strain+Sample+Cov1, covariate = ~ Cov1)

# gene specific covariate - make artificial 'covM' matrix [基因的具体协 - 使人工covM矩阵]
covm = matrix(rnorm(length(datafile)), nrow=nrow(datafile))
designfile.cov2 = cbind(design.table, Strain, Sample)
data.cov2=read.madata(datafile, designfile=designfile.cov2, covM=covm)
fit.cov2 = fitmaanova(data.cov2,formula = ~Strain+Sample+covM, covariate = ~ covM)
## End(Not run)[#结束(不运行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-4 14:47 , Processed in 0.028215 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表