Limma contrasts matrix drops columns and considers them as reference column
1
0
Entering edit mode
4.1 years ago
fr ▴ 210

In the limma vignette page 44, a simple 2 factorial example is given. My case follows something similar, where I have treatment and time.

TS <- paste(targets$Strain, targets$Treatment, sep=".")
TS <- factor(TS, levels=c("WT.U","WT.S","Mu.U","Mu.S"))
design <- model.matrix(~0+TS)
colnames(design) <- levels(TS)

The resulting design contains all possible columns.

In my case, I'm trying to do the same, but specifying different columns (strain and treatment), and then specifying design = model.matrix(~0 + strain + treatment, data=targets), but this results in 1 less column in strain and in treatment. I already know that a workaround is to merge everything as shown above and in the vignette, but why can't I do it in the same way when I specify data=targets?

Note that I have assigned the intercept as 0 just like in the design above.

limma design • 1.0k views
ADD COMMENT
0
Entering edit mode
4.1 years ago
Luiz ▴ 30

You can explicitly tell your comparison design through contrast.matrix() function.

ADD COMMENT
0
Entering edit mode

From which package does that come from? And taking the example of the vignette for instance, how would you do that?

ADD REPLY

Login before adding your answer.

Traffic: 2958 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6