LIMMA Differing P-Values for Treatment-Contrast Parameterization vs Group-Means Parameterization
1
0
Entering edit mode
abadgerw • 0
@5088ef59
Last seen 7 hours ago
United Kingdom

Gordon Smyth Thank you for developing such an amazing tool.

I have noticed that when I generate a model with covariates I see differences in p-values between a treatment-contrast parameterization vs group-means parameterization. The fold-changes are the same. I do not notice this with models that do not have covariates.

My code is the following for treatment-contrasts:

design<- model.matrix(~Status + Age + Sex + PMI, metadata)
fitA <- lmFit(batchregressed, design)
fitB <- eBayes(fitA, trend = FALSE, robust = TRUE)
tabA<- topTable(fitB, number = 2500, coef = 2)
coefA<- fitB$coefficients

My code is the following for group-means:

design2<- model.matrix(~0+Status + Age + Sex + PMI, metadata)
contrasts<- makeContrasts(StatusControl-StatusMS, levels=colnames(design2))
fitC <- lmFit(batchregressed, design2)
fitD <- contrasts.fit(fitC, contrasts)
fitE <- eBayes(fitD, trend = FALSE, robust = TRUE)
tabC<- topTable(fitE, number = 2500)
coefC<- fitE$coefficients

Is there anything that I am misspecifying? Would it be predicted that p-values would differ with these two model parametrization types?

Thanks in advance for your assistance.

limma • 1.3k views
ADD COMMENT
0
Entering edit mode

There's no need to ping people (me in this case) on this forum. Just adding the limma tag will ensure that someone relevant will help you.

ADD REPLY
2
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

If your data includes precision weights or missing values in the batchregressed object, then the p-values will differ slightly, if it doesn't then they will be identical. For an explanation of when p-values will differ, type ?contrasts.fit and see the section called Note.

ADD COMMENT
0
Entering edit mode

Thank you. I didn't include precision weights to my knowledge and set trend to FALSE. However, based on the documentation, missing values seem to be the culprit of the differences. Therefore, to confirm, the p-values are exact in the treatment-contrasts parameterization and approximate in the group-means parameterization in my case due to the presence of missing data?

ADD REPLY
1
Entering edit mode

That's correct.

ADD REPLY
0
Entering edit mode

Apologies but my only other related question is that when the model has missing values but no covariates (ie ~Status or ~0+Status), the treatment-contrasts and group-means parameterization show the same p-values. Is this to be expected?

ADD REPLY
1
Entering edit mode

Yes, it is to be expected. It is explained in the help page I refered you to, which says "the results from contrasts.fit are always exact if the coefficients being compared are statistically independent. This will be true, for example, if the original fit was a oneway model without blocking and the group-means (no-intercept) parametrization was used for the design matrix."

ADD REPLY

Login before adding your answer.

Traffic: 471 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6