This is another hypothetical/toy example. I have 3 samples, corresponding to one untreated condition and two treated ones, as encoded in the metadata
table below:
> metadata drug 1 NONE 2 A 3 B
Now, I create two deseq datasets, with different designs:
dds <- DESeq(DESeqDataSetFromMatrix(countData = counts, colData = metadata, design = ~ drug))
Finally, I compute results like this:
results <- list(A = results(dds, contrast = c("drugA", "drugNONE")), B = results(dds, contrast = c("drugB", "drugNONE")))
I'd call the results above "first-order", because they are all differences between the treated conditions and the untreated one.
I am interested, however, in the "second-order" results, namely the "differences between the differences". IOW, how do the effects of drugs A and B (relative to the untreated case) differ.
But is this the correct answer for this question?
Does this comparison gives me the wanted "second-order" differences? If i'm not mistaken, I get here the direct comparison of
B vs. A
. What kjo though really need is something like[B vs. NONE] vs. [A vs. NONE]
. Is it the same as[B vs. A]
?