[BioC] Problems making contrasts

James W. MacDonald jmacdon at med.umich.edu
Thu Feb 21 16:37:15 CET 2008


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 at 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



More information about the Bioconductor mailing list