makeAllContrasts: Create all pairwise contrasts

Description Usage Arguments Details Author(s) Examples

View source: R/anadiff.R

Description

Create the matrix of all pairwise contrasts between parameters for the test.LC function

Usage

1
makeAllContrasts(X, annot)

Arguments

X

the design matrix

annot

the annotation table of the individuals with the columns corresponding to the model variables

Details

This function create a contrasts matrix that can be used with the test.LC function. All pairwise comparisons for each variable stratified into all other variables are returned.

Author(s)

Nicolas Servant, Eleonore Gravier, Pierre Gestraud, Cecile Laurent, Caroline Paccard, Anne Biton, Jonas Mandel, Bernard Asselain, Emmanuel Barillot, Philippe Hupe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(marty)

##Class label 0/1
marty.type.num <- ifelse(marty.type.cl=="Her2+",0,1)

#Annotation of the grade of tumor
grade <- factor(sample(c(1:3),23,rep=TRUE),labels=c("I","II","III"))

annot <- data.frame(type=marty.type.num, grade=grade)
rownames(annot) <- colnames(marty)

marty.lm <- lm(marty[1,]~ annot$grade * annot$type)
X <- model.matrix(marty.lm)

LC <- makeAllContrasts(X, annot)

EMA documentation built on March 26, 2020, 8:40 p.m.