Hi, apologies in advance, I have read a bunch of the limma/dream tutorials on here, but none seem to exactly fit my question. I can adjust this to do duplicateCorrelation with limma if it seems more appropriate.
I have a repeated/paired measures design (Pre and Post an Intervention) and then a certain score (scaled here) where higher numbers are associated more severe disease. I want to model 2 things: 1) Genes that are up/down regulated with baseline severity. 2) Genes that are up/down regulated with change in severity from before to after the intervention
Based on the tutorials and all the posts here for limma/dream, rather than doing the Timepoint*Score Interaction, I tried to make it more interpretable this way:
#The Final Model here would contain the (1|Sub_ID) Random Effect and some other control vars.
head(model.matrix(~0 + Timepoint + Timepoint:Score, data = metadata))
TimepointPre TimepointPost TimepointPre:Score TimepointPost:Score
S1_1 1 0 1.1148724 0.0000000
S1_2 0 1 0.0000000 1.0429451
S2_1 1 0 0.8990906 0.0000000
S2_2 0 1 0.0000000 0.8990906
S3_1 1 0 0.7552361 0.0000000
S3_2 0 1 0.0000000 0.6473453
contrasts <- c(
BL_SEVERITY = TimepointPre:Score,
IMPROVEMENT = TimepointPost:Score - TimepointPre:Score
)
I have 2 questions: 1) is this the appropriate way to determine my differential expression at baseline and pre-post intervention within the same model? 2) Given that "Improvement" is associated with a reduction in the score from pre to post, could I simply flip the contrast (i.e., IMPROVEMENT = TimepointPre:Score - TimepointPost:Score) so that the final DEGs could be interpreted as "genes which are upregulated with improvement for interpretability?