Difference between (~group) and (~0+group) in design matrix edgeR
0
0
Entering edit mode
19 months 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!

R edgeR expression differential • 584 views
ADD COMMENT
0
Entering edit mode

I suggest you to read this guide to creating design matrices : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7873980/.

ADD REPLY

Login before adding your answer.

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