Dear All,

This question is regarding model.matrix function and the contrasts which
can be made after applying it. I used this function as a part of edgeR
package.

Here are 2 designs:

> design_1=model.matrix(~0+ Control+ Gender+ Location, data=data_2)
> colnames(design_1)
[1] "Control0"  "Control1"  "Gender1"   "Location1"

How could I get the contrast Gender1-Gender0, shouldn't it be included in
the columns since there is no intercept?

If I want to see the contrast (Gender1-Gender0), I could change the order
of the factors in the formula:
> design_2=model.matrix(~0+ Gender+ Control+ Location, data=data_2)
> colnames(design_2)
[1] "Gender0"   "Gender1"   "Control1"  "Location1"

But then there is a question: is there any mathematical difference between
2 designs?

If someone knows a link/book where the function model.matrix is well and in
details explained, please let me know.

Thank you very much in advance!
Mike

	[[alternative HTML version deleted]]

