I am analysing a dataset where i have subjects who were tested at baseline and then after 2 weeks of calorie restriction. I would like to see the genes DE between baseline and calorie restriction taking into account the persons age and BMI. As there is a before and after condition is only 2 weeks the age and BMI do not change. I am not sure how to adjust for this in my model.
An example of my dataset is:
For creating the design of limma i was thinking of the following design:
design <- model.matrix(~class:ID + age + BMI)
From this i run a normal limma analysis and extract the results from the class:ID term as this tells me the difference between baseline and after 2 weeks of CR for my genes. Is this correct?
Any input would be greatly appreciated!