Treating 2 coefficients as the same group in Limma
1
0
Entering edit mode
Ahdee ▴ 50
@ahdee-8938
Last seen 17 months ago
United States

Hi all, I would like to run a GLM using Limma, I have 3 coffecients

 biopsy met resect        
1       1   0      0  
2       1   0      0  
3       1   0      0  
4       1   0      0 
5       1   0      0 
6       0   0      1 
7       0   0      1  
8       0   1      0 
9       0   1      0 
10      0   1      0  

so for my contrast I want to compare (1) biopsy vs. resect (2) biopsy vs. met, however I would also like to (3) combine resect with met vs. biopsy.  

my contrast looks like this, 

cont.mod <- makeContrasts(MB=met-biopsy,RB=resect-biopsy,levels=design)

however if I wanted to combine resect with met (treating it as one group) vs. biopsy is this the correct way to approach it? 

 

thank you!

 

cont.mod <- makeContrasts(MB=met-biopsy,RB=resect-biopsy,MRB=(met+biopsy)/2-biopsy, levels=design)

 

 

limma glm • 966 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States

First a pedantic note. limma doesn't fit a glm, it fits a conventional linear model.

Your contrast isn't correct, probably just because of a typo. What you really want is

cont.mod <- makeContrasts(MB=met-biopsy,RB=resect-biopsy,MRB=(met+resect)/2-biopsy, levels=design)

Which will test that the mean of met and resect is different from biopsy.

ADD COMMENT
0
Entering edit mode

cool thanks; also in case someone is reading this for reference, soon after I tested this out by creating a different design with a merge coeffecients: the results were the same.  Aha, yes typo, thanks. 

 

ADD REPLY

Login before adding your answer.

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