Dear Dario,
Here's an example. Suppose you have three groups and you want to make
pairwise comparisons between them.
group <- factor(c(1,1,2,2,3,3))
design <- model.matrix(~group)
fit <- glmFit(y,design,etc)
The fit has three parameters. The first is the baseline level of group 1.
The second and third are the 2vs1 and 3vs1 differences.
To compare 2 vs 1:
lrt.2vs1 <- glmFit(y,fit,coef=2)
To compare 3 vs 1:
lrt.3vs1 <- glmFit(y,fit,coef=3)
To compare 3 vs 2:
lrt.3vs2 <- glmFit(y,fit,contrast=c(0,-1,1))
The constrast argument says you want to test coef3-coef2 equal to zero.
Best wishes
Gordon
Date: Wed, 31 Aug 2011 10:00:33 +1000 (EST)
From: Dario Strbenac <d.strbe...@garvan.org.au>
To: bioc-sig-sequencing@r-project.org
Subject: [Bioc-sig-seq] edgeR glmLRT contrast Argument
Message-ID: <20110831100033.bms26...@gimr.garvan.unsw.edu.au>
Content-Type: text/plain; charset=us-ascii
Good morning,
I'm looking for examples of what types of use cases the contrast
argument is used for. I'm not sure what are the cases when the argument
coef will not be enough, and when I will need to use it.
Thank you.
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
_______________________________________________
Bioc-sig-sequencing mailing list
Bioc-sig-sequencing@r-project.org
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing