[BioC] Building specific Ortoghonal contrasts in LIMMA
Gordon K Smyth
smyth at wehi.EDU.AU
Sun May 13 07:44:06 CEST 2012
Dear Miriam,
I am assuming that you already know how to create factors in R to
represent Damdiet and MR. You need something like:
Damdiet <- factor(Damdiet, levels=c("Ctl","SFA","EFA"))
MR <- factor(MR, levels=c("LLA","HLA"))
contrasts(Damdiet) <- cbind(CtlvsSFAEFA=c(-2,1,1), EFAvsSFA=c(0,-1,1))
contrasts(MR) <- c(-1,1)
design <- model.matrix(~Damdiet*MR)
Then the five contrasts you have specified will be coefficients 2-6 of the
fitted model (in the same order that you listed them).
Best wishes
Gordon
> Date: Sat, 12 May 2012 06:46:06 +0000
> From: "Garcia Orellana,Miriam" <mgarciao at ufl.edu>
> To: "bioconductor at r-project.org" <bioconductor at r-project.org>
> Subject: [BioC] Building specific Ortoghonal contrasts in LIMMA
>
> Dear All:
> I just started getting familiar with the use of R and different packages
> to analyze liver samples. After some reading and searching I was able to
> understand how to pre-process the data including normalization with
> GCRMA but now I got a problem when using LIMMA and trying to built my
> design.
> I have 18 arrays, a group of 6 are from liver of calves that were born
> from dams fed 3 different diets (Damdiet: Ctl, SFA, EFA). After the
> calves were born, a group of 3 from each dam diet were fed 2 different
> milk replacers (MR: LLA, HLA). So I have a factorial (3x2). I am
> interested in evaluating specific orthogonal contrast and I couldn't
> find any online help about how I can set the model matrix in limma for
> those contrast of interest.
> As if I were to use my orthogonal contrast in SAS they would be:
> contrast 'Ctl vs (SFA+EFA)' Damdiet -2 1 1;
> contrast 'EFA vs SFA' damdiet 0 -1 1;
> contrast 'MR' MR -1 1;
> contrast 'MR by ctl vs (SFA+EFA)' MR*damdiet 2 -1 -1 -2 1 1;
> contrast 'MR by EFAvs SFA' calfdiet*damdiet 0 1 -1 0 -1 1;
>
> I will deeply appreciate any help.
> Miriam
>
>
> ********************************
> Miriam Garcia, MS
> PhD candidate
> Department of Animal Sciences
> University of Florida
>
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list