Entering edit mode
2.4 years ago
diego1530
▴
80
Hi there!
It's a common concern when we are designing our matrix with edgeR. Note I have the follow colData:
condition time group
mock 4 mock.4
mock 12 mock.12
treated 4 treated.4
treated 12 treated.12
My purpose is to make contrasts among different groups, using a design matrix as:
group <- colData$group
design <- model.matrix(~ group)
colnames(design) <- levels(group)
design
However, when I use this matrix, including ~0
group <- colData$group
design <- model.matrix(~ 0 + group)
colnames(design) <- levels(group)
design
I get different results, why? what is the difference? and what is suitable?
Thanks in advance!
I suggest you to read this guide to creating design matrices : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7873980/.