contrastMatrix(ArrayTools)
contrastMatrix()所属R语言包:ArrayTools
Class to Contain the Contrast Matrix that Used for Linear Regression
类包含用于线性回归的对比矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Class to Contain the Contrast Matrix that Used for Linear Regression,
类包含用于线性回归的对比矩阵,
创建对象----------Creating Objects----------
new("contrastMatrix", ..., design.matrix=[designMatrix], compare1=[character], compare2=[character], level=[character], interaction==[numeric]).
new("contrastMatrix", ..., design.matrix=[designMatrix], compare1=[character], compare2=[character], level=[character], interaction==[numeric])。
This creates a contrast matrix class. design.matrix is a designMatrix class. compare1 the first value of the main covariate, and compare2 is the second 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 and "drug2" as compare2. If interaction==TRUE, do not specify compare1 and compare2. You only specify level 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 as well. You only specify interaction=TRUE when you would like to detect the interaction effect between two covariates. In this case, do not provide values for compare1, compare2, and level
这将创建一个对比矩阵类。 design.matrix是一个designMatrix类。 compare1第一个值,主要协变量和compare2是主要协变量的第二个值。例如,假设,主要协变量是“毒品”,并有三个独特的价值观:“drug1”,“drug2”,“安慰剂”。您想比较“drug1”为“drug2”的。那么你可以使用“compare1drug1”和的“drug2”compare2。如果interaction==TRUE,不指定compare1和compare2。你只指定level当设计矩阵包含一个交互项。假如你想比较的“drug1”“drug2”只有当雌激素是“礼物”,“礼物”是雌激素的变量的值之一。您将使用水平作为“礼物”。如果interaction==TRUE,不指定这个值。你只指定interaction=TRUE当你想检测两个协变量之间相互作用的影响。在这种情况下,不提供compare1,compare2,level值
插槽----------Slots----------
contrast: Object of class "matrix" contains the contrast matrix
contrast:"matrix"类对象包含的对比矩阵
compare1: Object of class "character" contains compare1
compare1:"character"类对象包含compare1
compare2: Object of class "character" contains compare2
compare2:"character"类对象包含compare2
level: Object of class "character" contains level
level:"character"类对象包含level
interaction: Object of class "logical" contains interaction
interaction:"logical"类对象包含interaction
design: Object of class "matrix" contain the design matrix
design:Object类的"matrix"包含的设计矩阵
target: Object of class "data.frame" contains target
target:"data.frame"类对象包含target
covariates: Object of class "character" contains covariates
covariates:"character"类对象包含covariates
intIndex: Object of class "numeric" contains intIndex
intIndex:"numeric"类对象包含intIndex
延伸----------Extends----------
Class "designMatrix", directly.
类"designMatrix",直接。
方法----------Methods----------
getCompare1 signature(object = "contrastMatrix"):
getCompare1signature(object = "contrastMatrix"):
getCompare2 signature(object = "contrastMatrix"):
getCompare2signature(object = "contrastMatrix"):
getContrast signature(object = "contrastMatrix"):
getContrastsignature(object = "contrastMatrix"):
getInteraction signature(object = "contrastMatrix"):
getInteractionsignature(object = "contrastMatrix"):
getLevel signature(object = "contrastMatrix"):
getLevelsignature(object = "contrastMatrix"):
initialize signature(.Object = "contrastMatrix"):
初始化signature(.Object = "contrastMatrix"):
show signature(object = "contrastMatrix"): print the contrast matrix
显示signature(object = "contrastMatrix"):打印对比度矩阵
作者(S)----------Author(s)----------
Xiwei Wu, Arthur Li
参见----------See Also----------
designMatrix
designMatrix
举例----------Examples----------
data(eSetExample)
## One-way Anova[#单向方差分析]
(design1<- new("designMatrix", target=pData(eSetExample), covariates = "Treatment"))
(contrast1<- new("contrastMatrix", design.matrix = design1,
compare1 = "Treated", compare2 = "Control"))
## Randomized block design[#随机区组设计]
(design2<- new("designMatrix", target=pData(eSetExample),
covariates = c("Treatment", "Group")))
(contrast2<- new("contrastMatrix", design.matrix = design2,
compare1 = "Treated", compare2 = "Control"))
## Interaction design[#互动设计]
(design3<- new("designMatrix", target=pData(eSetExample),
covariates = c("Treatment", "Group"), intIndex=c(1,2)))
# Test for interaction:[互动测试:]
(contrast.int<- new("contrastMatrix", design.matrix = design3,
interaction=TRUE))
# Compare Treated vs Control among group A[其中A组比较治疗组与对照组]
(contrast.a<- new("contrastMatrix", design.matrix = design3,
compare1 = "Treated", compare2 = "Control", level="A"))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|