I've been trying to redo a contrast using makeContrasts. The contrast was originally made using the coefficients, but I realized I did not really understand what it actually was doing, however I've been unable to recreate the results using the makeContrasts command.
design <- model.matrix(~0+targets$group, data=y$samples) y <- estimateDisp(y,design,robust=TRUE) fit <- glmQLFit(y, design,robust=TRUE) colnames(fit)  "T1.LD.FW" "T2.LD.FW" "T2.SP.FW" "T3.LD.FW" "T3.SP.FW" "T4.LD.FW" "T4.SP.FW" "T4.SPLD.FW"  "T5.LD.FW" "T5.SP.FW" "T5.SPLD.FW" "T6.LD.FW" "T6.SP.FW" "T6.SPLD.FW" SPLLvsLL <- glmQLFTest(fit, contrast = c(0,0,0,0,0,-1,0,1,-1,0,1,-1,0,1))
Originally I thought it would work like the example in 3.3.1 in the user guide, with
contrast=c(-1,0,1,1,0,-1) being equivalent to the the DrugvsPlacebo.2h contrast, but writing it out as
t<- makeContrasts (SPLDvsLD = (T6.SPLD.FW-T6.LD.FW) - (T5.SPLD.FW-T5.LD.FW) - (T4.SPLD.FW-T4.LD.FW), levels=design)
is not providing the same results. So I guess there's something I do not understand/a point that I'm missing. I've also tried some other 'creative' ways of writing this out without getting to the same results. I noticed that the signs for the placebo-coefficients are opposite to the drugs in the example of 3.3.1?
T1, T2, T3, T4, T5, T6 refers to timepoints for the sampling throughout the experiment, and LD, SP, SPLD refers to the treatments. The FW component is not relevant, it refers to one out of two conditions in the original experiment, but I'm just interested in the differences between treatments over time in the FW-condition. I realize that I might be better of running pairwise comparisons between treatments for each timepoint, but in any case I would like to gain some understanding of the above as well.
I'd much appreciate it if anyone has the time to clarify this for me,