[BioC] Limma and multiple groups

James W. MacDonald jmacdon at uw.edu
Fri Oct 19 17:33:40 CEST 2012


Hi Andrew,

On 10/19/2012 11:09 AM, Andrew Beggs [guest] wrote:
> Hi,
>
> I am analysing microarray experiments with two groups, and with 3/4 groups using limma.
>
> I am looking at differential methylation between, for example, two groups with 3 samples in each, which I can easily do by setting my design matrix to say:
>
> design<- cbind(Grp1=1,Grp2vs1=c(0,0,0,1,1,1))
>
> How do I do this with say 3 (or even 4) groups, i.e. Early-Intermediate-Late disease states vs. methylation?

You want to use model.matrix().

groups <- factor(rep(c("Early","Intermediate","Late"), each = 3))
design <- model.matrix(~groups)

This is if you want to do a factor levels type analysis like you did 
with the design above. Note that this will set the 'Early' sample as 
baseline. You can specify the levels argument to factor() if you want a 
different baseline, or you can do a cell means model where there isn't a 
baseline, and you are then forced to do contrasts for any comparison.

As an aside, there are packages designed specifically for analyzing 
methylation data.

Best,

Jim


>
> Many thanks for helping - sorry it's such a basic question.
>
> Andrew
>
>   -- output of sessionInfo():
>
>
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> 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
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list