Hi all. Currently I am working on differential gene expression analysis using limma R package. The metadata of my dataset includes both Treatment and Time variables. Example of the same is shown below :
I want to check the effect of interaction of both Treatment and Time over the expression of genes. After following the manual of Limma, I saw that interaction between the variables can be studied using the below method :
1) concatenate both Treatment and Time using "." as a separator, store it in a variable, say "Trt_time and build model using below formula :
design <- model.matrix(~0+Trt_time) The contrast to study the interaction between the variables was set as following :
cont.matrix <- makeContrasts( Interaction_Term=(Trt.6-Trt.0)-(UnTrt.6-UnTrt.0), levels=design) Is this the right way to study the combined effect of both variables on the gene expression?
2) Can the below formula yield similar results :
design <- model.matrix(~0+Time+Treatment+Time:Treatment) In what way are both the design formula different?
Thank You ! ```