Model matrix confront 2 groups out of 3
0
0
Entering edit mode
12 months 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:

 set.seed(1)
 system.time({
    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 • 502 views
ADD COMMENT
1
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.

ADD REPLY

Login before adding your answer.

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