Hi

Now I have tried to use my formula (dividing on 2, 4 and nothing), what James suggested and also made a new design matrix.

When I divided on 2, 4 or nothing, or used James suggestion I got the same results:

> designMa
   H_s HC_s T_s TC_s
H    1    0   0    0
H    1    0   0    0
H    1    0   0    0
HC   0    1   0    0
HC   0    1   0    0
HC   0    1   0    0
T    0    0   1    0
T    0    0   1    0
T    0    0   1    0
TC   0    0   0    1
TC   0    0   0    1
TC   0    0   0    1

> oppsum
   H_s - HC_s T_s - TC_s (H_s - HC_s + T_s - TC_s)
-1        733        874                      1077
0       47292      47065                     46631
1         676        762                       993
>
> oppsum
   H_s - HC_s T_s - TC_s (H_s - HC_s + T_s - TC_s)/2
-1        733        874                        1077
0       47292      47065                       46631
1         676        762                         993

> oppsum1
   H_s - HC_s T_s - TC_s (H_s - HC_s + T_s - TC_s)/4
-1        733        874                        1077
0       47292      47065                       46631
1         676        762                         993


But when I made a new matrix:

> designMa
   s us
H  1  0
H  1  0
H  1  0
HC 0  1
HC 0  1
HC 0  1
T  1  0
T  1  0
T  1  0
TC 0  1
TC 0  1
TC 0  1

                                                                        
contrast.matrix <- makeContrasts(s-us, levels = designMa)                               

I got a different answer:

> oppsum2
   s - us
-1      8
0   48657
1      36


My question now is: Why and what is the right solution? And why divide on 2 or 4 (this I read in the limma user guide, section 8.7)

Regards,
Ingrid

Hi Ingrid,

I haven't used makeContrasts() for a while now, so I'm not sure I can 
help with that. However, it isn't difficult to construct your contrast 
matrix by hand.

nam <- colnames(design)
contrast <- matrix(c(1,-1,0,0,0,0,1,-1,0.5,-0.5,0.5,-0.5), ncol = 3,
		dimnames = list(nam,c(paste(nam[c(1,3)], nam[c(2,4)],
		sep = "-"), "Stimulated-Unstimulated")))

You might get the same result by dividing by two in your call to 
makeContrasts() rather than four.

Best,

Jim


		

Ingrid H. G. Østensen wrote:
> Hi
> 
> I have some problems making my contrast matrix. 
> 
> I have the following design matrix:
> 	P_s	P_us	D_s	D_us
> S1	1	0	0	0
> S2	1	0	0	0	
> S3	0	1	0	0
> S4	0	1	0	0
> S5	0	0	1	0
> S6	0	0	1	0	
> S7	0	0	0	1
> S8	0	0	0	1
> 
> 
> Where P = patiens and D = donor, s = stimulated and us = unstimulated
> 
> What I want is to find the following differences:
> The differences between stimulated and unstimulated in the patients group, and the differences between stimulated and unstimulated in the donor group. This I am able to make, the two first contrasts.
> 
> But then I also want to see the difference between the two treatmens undepended of samples: stimulated vs unstimulated. 
> In other words: (P_s and D_s) vs (P_us and D_us). Is my last contrast correct or should I do something else?
>                                                                         
> contrast.matrix <- 
> makeContrasts(P_s-P_us, D_s-D_us, (P_s-P_us + D_s-D_us)/4, levels = designMa)                                  
> 
> Regards,
> Ingrid
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


	[[alternative HTML version deleted]]

