[BioC] Limma, model with several factors

Gordon K Smyth smyth at wehi.EDU.AU
Tue May 21 02:29:28 CEST 2013


Dear Ingrid,

If you block on subject (as in Section 8.4 of the User's Guide), then you 
have automatically blocked on center as well, because the subjects are 
different in the two centers.

You experiment can be analyzed as suggested in Section 8.4.2 of the User's 
Guide.

First combine treatment and timepoint into one factor (following Section 
8.5.2):

   Treat.Time <- factor(paste(treatment,timepoint,sep="."))

Then make a design matrix including the blocking factor:

   design <- model.matrix(~0+Treat.Time+Subject)
   colnames(design)[1:4] <- levels(Treat.Time)
   cont.matrix <- makeContrasts((F.A-F.B)-(P.A-P.B),levels=design)

etc.

The rule is that the experimental factors of interest are combined into 
the treatment factors, whereas the nuisance factors are blocked on.

Best wishes
Gordon

> Date: Mon, 20 May 2013 01:01:08 -0700 (PDT)
> From: "Ingrid Dahlman [guest]" <guest at bioconductor.org>
> To: bioconductor at r-project.org, ingrid.dahlman at ki.se
> Subject: [BioC] Limma, model with several factors
>
>
> I have carefully read the Limma users guide but still have not sorted 
> out how I design the contrasts for the following Project.
>
> In want to compare the effect (After vs before) of two different 
> treatments, F and P. The study was carried our in two different centers. 
> This can be illustrated as follows:

> Subject center treatment timepoint
> 1            1         F          B
> 1            1         F          A
> 2            1         P          B
> 2            1         P          A
> 3            2         F          B
> 3            2         F          A
> 4            2         P          B
> 4            2         P          A

> I want to compare (F.A-F.B)-(P.A-P.B), blocking for subject. However, in 
> addition, I would like to block for center. I.e. the center is like a 
> batch effect.

> Is it possible to block for two factors, suject and center, in the same 
> test in Limma?

> /Ingrid
>
> -- output of sessionInfo():
>
> See section 8.7 in the user guide.
>
> --
> Sent via the guest posting facility at bioconductor.org.
>

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list