limma contrast matrix
0
0
Entering edit mode
@belmont-john-w-4793
Last seen 10.2 years ago
I am trying to correct for the effect of 2 covariates in a gene expression data set. design<-model.matrix(~0 + Factor + cov1 + cov2) QUESTION: How to set up the contrast matrix? The usual commands fit <- lmFit(selDataMatrix, design) cont.matrix <- makeContrasts(FacCont=Group1-Group2, levels=design) fit2 <- contrasts.fit(fit, cont.matrix) gives an error message because the original design matrix includes the covariates. Error in contrasts.fit(fit, contrast.matrix) : Number of rows of contrast matrix must match number of coefficients In addition: Warning messages: 1: In rn != cn : longer object length is not a multiple of shorter object length 2: In contrasts.fit(fit, contrast.matrix) : row names of contrasts don't match col names of coefficients I think I don't really understand how the contrast matrix works. John W. Belmont, M.D.,Ph.D. Professor Department of Molecular and Human Genetics Baylor College of Medicine 1100 Bates, Room 8070 Houston, TX 77030 713-798-4634 fax: 713-798-7187 [[alternative HTML version deleted]]
• 1.7k views
ADD COMMENT

Login before adding your answer.

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