make.contrast(AffyExpress)
make.contrast()所属R语言包:AffyExpress
Create a contrast matrix
创建一个对比矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Create a contrast matrix based on a given design matrix
创建一个对比矩阵的基础上给定的设计矩阵
用法----------Usage----------
make.contrast(design.matrix, compare1=NULL, compare2=NULL, level=NULL,
interaction=FALSE)
参数----------Arguments----------
参数:design.matrix
a design matrix returned from the make.design funcion
设计矩阵返回从make.design funcion
参数:compare1
the first value of the main covariate. For example, suppose that the main covariate is "drug", and there are three unique values: "drug1", "drug2", and "placebo". You would like to compare "drug1" to "drug2". Then you would use "drug1" as compare1. If interaction==TRUE, do not specify this value.
主要协变量的第一个值。例如,假设,主要协变量是“毒品”,并有三个独特的价值观:“drug1”,“drug2”,“安慰剂”。您想比较“drug1”为“drug2”的。那么你可以使用“drug1”作为比较1。如果互动== TRUE时,不指定此值。
参数:compare2
the second value of the main covariate. Based on the example above, if you would like to compare "drug1" vs "drug2", then you would use "drug2" as compare2. If interaction ==TRUE, do not specify this value
主要协变量的第二个值。基于上面的例子,如果你想比较“drug1”与“drug2”的,那么你会使用捕捉“drug2”。如果互动== TRUE时,不指定此值
参数:level
you only specify this term when the design matrix contains an interaction term. Suppose that you would like to compare "drug1" to "drug2" only when estrogen is "present", where "present" is one of the values of the estrogen variable. You will use "present" as level. If interaction==TRUE, do not specify this value
你只指定这个词时设计矩阵包含一个交互项。假如你想比较的“drug1”“drug2”只有当雌激素是“礼物”,“礼物”是雌激素的变量的值之一。您将使用水平作为“礼物”。如果互动== TRUE时,不指定此值
参数:interaction
you only specify interaction=TRUE when you would like to detect the interaction effect between two covariates. When you specify interaction=TRUE, do not provide values for compare1, compare2, and level
你唯一指定互动= TRUE时,你想检测两个协变量之间相互作用的影响。当你指定的相互作用= TRUE时,不提供值比较1,比较和水平
值----------Value----------
contrast matrix for the linear model
对比矩阵的线性模型
作者(S)----------Author(s)----------
Xiwei Wu <a href="mailto:xwu@coh.org">xwu@coh.org</a>, Xuejun Arthur Li <a href="mailto:xueli@coh.org">xueli@coh.org</a>
参见----------See Also----------
make.design
make.design
举例----------Examples----------
target<-data.frame(drug=(c(rep("A",4),rep("B",4),rep("C",4))),
gender=factor(c(rep("M",6),rep("F",6))),
group=factor(rep(c(1,2,3),4)))
# Example1: Compare drug "A" vs. "B"[例1:比较药物“一”与“B”的]
design1<-make.design(target, "drug")
contrast1<-make.contrast(design1, "A", "B")
# Example2: Compare drug "A" vs. "B", adjusting for "group" variable[例2:比较药物的“A”和“B”的,调整为“本集团”变量]
design2<-make.design(target, c("drug","group"))
contrast2<-make.contrast(design2, "A", "B")
# Example3: Suppose you are interested in "drug", "group" interaction[示例:假设你有兴趣在“药”,“组”互动]
design3<-make.design(target, c("drug","group"), int=c(1,2))
contrast3<-make.contrast(design3, interaction=TRUE)
# Example4: Compare drug "A" vs. "B" among "male"[举例4:比较之间的“男性”药“一”与“乙”]
# Notice that you must use an design matrix containing an interaction term[请注意,您必须使用一个设计矩阵包含交互项]
design4<-make.design(target, c("drug","gender"), int=c(1,2))
contrast4<-make.contrast(design4, "A", "B", "M")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|