A question about model matrix and contrast
1
1
Entering edit mode
8 weeks ago
jkim ▴ 220

Hello,

I was reading A guide to creating design matrices for gene expression experiments and have a quick question about one comparison in the article.

For comparisons between groups, we form contrasts using only the first 4 parameter estimates, and keep lane and technician consistent. For example, a contrast comparing group A to group B can be coded as makeContrasts(groupA-groupB, levels=colnames(design)). All other pairwise comparisons can also be included into the contrast matrix.

Does the groupA - groupB mean overall differences between group A vs group B or differences group A vs group B within lane 1 and tech1?

In addition, I just wanted to thank the authors of the article. It’s such a hidden gem, and I’ve read it many times.

model.matrix(~0+group+lane+technician)

##    groupA groupB groupC groupD laneL2 technicianII
## 1       1      0      0      0      1            0
## 2       1      0      0      0      1            0
## 3       1      0      0      0      0            1
## 4       0      1      0      0      0            0
## 5       0      1      0      0      1            1
## 6       0      1      0      0      0            0
## 7       0      0      1      0      0            1
## 8       0      0      1      0      1            1
## 9       0      0      1      0      0            0
## 10      0      0      0      1      0            1
## 11      0      0      0      1      1            1
## 12      0      0      0      1      1            0
makeContrasts limma • 501 views
ADD COMMENT
2
Entering edit mode
8 weeks ago
Gordon Smyth ★ 8.3k

The additive model you have fitted assumes that the group differences are the same for all lanes and all technicians. So any group contrast is an overall difference.

The group coefficients represent log-expression for lane 1 and tech 1, but that is an absolute estimate rather than a difference. The differences between the group coefficients are always the same.

ADD COMMENT
0
Entering edit mode

Thanks a lot, Dr. Smyth!

ADD REPLY

Login before adding your answer.

Traffic: 3099 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