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
Thanks a lot, Dr. Smyth!