Entering edit mode

science555111
•
0

@science555111
Last seen 10 weeks ago

The edgeR vignette talks about additive models when dealing with paired samples (and then also when adjusting for batch effects.) Can we use additive models when adjusting for other variables? Take this example

```
Samples Treatment Sex
Sample_1 Control M
Sample_2 Control M
Sample_3 Control M
Sample_4 Treatment M
Sample_5 Treatment M
Sample_6 Treatment M
Sample_7 Control F
Sample_8 Control F
Sample_9 Control F
Sample_10 Treatment F
Sample_11 Treatment F
Sample_12 Treatment F
```

If we are only interested in looking at the effect of treatment, would a model matrix like this be appropriate?

```
model.matrix(~Sex + Treatment)
```