[BioC] topTable coefficient

Atul Kakrana atulkakrana at outlook.com
Tue Jun 11 02:00:46 CEST 2013

Hi Ed,

The 'coef' argument let user's specify the contrast for which toptable 
should be generated. So, if you made multiple contrasts like:

contrast.matrix<-makeContrasts(Ten-Control,Eleven-Control,Twelve-Control, levels=design)## 
We made three contrasts here ten-control, eleven-control and twelve-control
fit2<- contrasts.fit(fit,contrast.matrix)
fit2 <- eBayes(fit2)

Now if you want the toptable for first contrast in your matrix 
'Ten-Control' specify coef=1, like this:
topTable(fit2, coef = 1, adjust = "fdr", number = 50,sort.by='logFC')

If you want toptable for 2nd contrast i.e. 'Eleven-Control' than specify 
coef=2, like this:
topTable(fit2, coef = 2, adjust = "fdr", number = 50,sort.by='logFC')

So, its just a way specifying your contrasts in numbers rather than 
writing whole contrast. The 'coef' count starts from 1 and not 0, 
therefore you get an error with 'coef=0'.



On 10-Jun-13 6:00 PM, Ed Siefker wrote:
> What does the 'coef' argument to topTable() actually do?
> I know it says in the manual:
> column number or column name specifying which coefficient or
> contrast of the linear model is of interest
> But what does that mean mathematically?  Why does specifying
> the coefficient alter the results of the top table?  Either a probe
> is differentially expressed or it isn't, right?
> I'm having trouble conceptualizing why there are multiple coefficients
> at this stage at all.  Suppose my contrast is "MUvsWT=MU-WT".
> How do you get more than one result when you subtract WT from MU?
> If I run topTable(fit,coef=1) does that get me MU, WT, or MU-WT?
> If I run topTable(fit, coef=2) does that get me MU, WT, or MU-WT?
> If I run topTable(fit, coef=0) or topTable(fit, coef=2), I get an error.
> Which of those isn't a coefficient and why not?
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioconductor mailing list