Question: order of covariates for GLM with edgeR
0
3.4 years ago by
aec40
aec40 wrote:

Hi,

I would like to know if the order of the covariates when constructing the design matrix for edgeR software matters.

For example:

design = model.matrix (~0+sex+batch+condition)

is the same as :

design = model.matrix (~0+condition+sex+batch)

thanks,

modified 3.4 years ago by Gordon Smyth37k • written 3.4 years ago by aec40
Answer: order of covariates for GLM with edgeR
2
3.4 years ago by
Aaron Lun23k
Cambridge, United Kingdom
Aaron Lun23k wrote:

It won't affect dispersion estimation or fitting of the model, but it will affect how you parametrize your DE contrasts at the end. By default, glmLRT will drop the last coefficient; this will result in a different DE comparison between the two models, because the identity of the last term will be change when you mix up the order.