This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Limma Differential Expression RNASeq, please help

I am a newbie so sorry for asking a simple question. Can someone help me answer the following question, I spent many hours but stuck?

Thank you so much in advance for your help.

Here is my models:

 model1.matrix(  ~ Group + Gender + Group:Gender , data=X, contrasts.arg = 
                     lapply(data.frame(X[,sapply(data.frame(X), is.factor)]),
                            contrasts, contrasts = FALSE))

 model3.matrix(  ~ Group:Gender , data=X, contrasts.arg = 
                     lapply(data.frame(X[,sapply(data.frame(X), is.factor)]),
                            contrasts, contrasts = FALSE))

When I run the following code on the above models:

fit = lmFit(data, model)
efit<-eBayes(fit)
topTable(edit)

I get completely different answers for the "Group:Gender" when using model1.matrix Versus model3.matrix. The model3.matrix appears to be correct for "Group:Gender". Can someone show exactly how to fix model1.matrix so I get the same results for "Group:Gender" in model3.matrix

Here is my metadata:

Sample.ID       TimePoint       Group   Gender
301     0       Group1  Female
302     0       Group1  Male
303     0       Placebo Female
304     0       Group1  Female
305     0       Group1  Female
306     0       Placebo Female
307     0       Group2  Female
308     0       Group2  Female
309     0       Group2  Female
310     0       Placebo Male
311     0       Group3  Female
312     0       Group3  Male
313     0       Group3  Female
314     0       Group2  Female
315     0       Placebo Male
316     0       Group2  Female
317     0       Group3  Male
318     0       Group2  Male
319     0       Placebo Male
320     0       Group1  Male
ETC....

limma rna-seq rna-seq r

1 answer

You will never get the same result for Group:Gender from a model that accounts for the main effects and a model that doesn't account for the main effects, because the estimates of the main effects will change the estimates of the interactions.

Log in to answer this question.