Warning message when running limma with covariates
1
0
Entering edit mode
Chris ▴ 20
@3fdb6f97
Last seen 4 months ago
United States

Hi all,

May I know if this warning message affect downstream analysis? Couldn't find this error after googling. Thank you so much!

design <- model.matrix(~ vector_age + sex_vector + group_vector, compare_genes)
fit <- lmFit(numeric_matrix, design)
fit2 <- contrasts.fit(fit, contrast_matrix)

Warning message:
In contrasts.fit(fit, contrast_matrix) :
  row names of contrasts don't match col names of coefficients
limma • 517 views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 3 hours ago
WEHI, Melbourne, Australia

The message seems self-explanatory. It is telling you that row.names(contrast_matrix) is not the same as colnames(fit).

Like all warning messages in R, it doesn't say that the analysis is necessarily wrong (that would be an error rather than an warning) but it prompts you that something looks strange and that you should double-check that what you are doing is correct. Does the contrast matrix that you have formed correctly correspond to this design matrix or are you inputing the wrong contrast matrix?

ADD COMMENT
0
Entering edit mode

Hi Gordon,

My contract matrix has rows name: Intercept, vector_age, sex_vector2, group_vectorMCI. Column name design matrix: (Intercept), vector_age, sex_vector2, group_vectorMCI. I think the warning because Intercept in contract matrix doesn't have () as in design matrix. So we can ignore this warning, right? Thank you!

ADD REPLY
1
Entering edit mode

That's right, you can ignore the warning.

ADD REPLY

Login before adding your answer.

Traffic: 508 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