I wonder if someone could double check that this design is fine. I have a design with paired samples and I'd like to test for the effect of the treatment and the interaction between treatment and group.
This is the experiment: Overweight and normal patients are investigated for their response to a treatment. Samples are taken from each patient before and after the treatment. I'm interested in identifying genes which respond to the treatment differently in obese vs normal. This is to be tested with a fixed effects model, not using the duplicateCorrelation option.
group <- paste0(obese_normal, ".", before_after) design <- design.matrix(~ 0 + subject + group)
This design matrix isn't full rank (1 dependent column). I therefore remove the "obese.before" column. "normal.before" was the first level so it's already removed. After that it's full rank. Am I correct in that I can now test for the interaction effect with:
contrast <- makeContrasts(obese.after - normal.after, levels=design)