Model matrix confront 2 groups out of 3
Entering edit mode
17 days ago

I am having difficulty understanding the comparison between conditions in the design formula created for an analysis with DRIMSeq.

Basically, I have 3 conditions: Healthy, Not_healthy1, Not_healthy2. My purpose is to feed the model comparing Healthy vs Not_healthy1 and Healthy vs Not_healthy2 (separately), but I am confused about the design formula. I created it with the following code, with -1 indicating no intercept:

design_full <- model.matrix(~ -1 + condition, data=DRIMSeq::samples(d))

The design formula is this one:

    Not_healthy1    Not_healthy2    Healthy
 P1     1               0              0
 P2     1               0              0
 P3     0               0              1 
 P4     1               0              0

The next step for the analysis will be this one:

    d <- dmPrecision(d, design=design_full)
    d <- dmFit(d, design=design_full)
    d <- dmTest(d, coef="Healthy") 

How can I set as baseline the condition Healthy and compare that to the others exclusively ? I think that in this way I am comparing Healthy versus al the others, that is not correct for my purposes.

modelmatrix r designformula deseq2 drimseq • 207 views
Entering edit mode

I don't know the DRIMseq package, but basically you have two options. Either use a design without intercept (~0+group) and then use contrasts or with an intercept and make sure that group is a factor and the reference level is the group level you want to compare against.


Login before adding your answer.

Traffic: 2338 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6