[BioC] two way anova with interaction effect : limma package
James W. MacDonald
jmacdon at med.umich.edu
Mon Dec 6 21:48:15 CET 2010
Hi Antony,
On 12/6/2010 1:31 PM, John Antony Gaspar wrote:
> Dear Bioc,
>
> I have 5 groups of samples with their WT type, Diff type and Diff & pure
> type. To make it clear
> aES,aDiff,aDiff_pure, bES,bDiff,bDiff_pure, cES,aDiff,cDiff_pure,
> dES,dDiff,dDiff_pure, eES,eDiff,eDiff_pure.
>
> I wish to do two way anova (differentiation and pure_treatment)
> calculation.
> Therefore I just try with the following code with limma package:
> -----
> Diff<-factor(c(1,1,1,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2))
>
>
> Cond<-factor(c(1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,2,2,2))
>
>
> design<-model.matrix(~Diff+Cond)
>
> fit<-lmFit(limma_data,design)
>
> fit<-eBayes(fit)
>
> limma_deg_result<-topTableF(fit,number=45101,genelist=fit$genes,adjust.method="BH")
>
> limma_deg_result <- limma_deg_result[limma_deg_result$adj.P.Val<=0.05,]
> write.table(limma_deg_result, "DEgenes.txt", quote=FALSE,
> row.names=FALSE, sep="\t")
>
> -------
>
> Of course, I ended up with a DEgenes.txt table.
> However my worry is to know whether am I right in setting design.
> and another thing is I wish to have the interaction effect of Diff and
> Cond.
> In that case in what way I have to set model in design.
>
> I may be a fool to do this with insufficient knowledge I have to have
> the interaction effect by setting design as it follows
> design<-model.matrix(~Diff*Cond)
You won't be able to compute the interaction effect, as you have no
instances where Diff = 2 and Cond = 1.
Best,
Jim
>
> I am ended up with the following problem:
>
> /Coefficients not estimable: Diff2:Cond2
> Warning message:
> Partial NA coefficients for 45101 probe(s)/
>
> Please correct me where I do mistake.
>
>
> Thanking you in advance,
> antony
>
> _______________________________________________
> 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
--
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
More information about the Bioconductor
mailing list