[BioC] Need help in Anova design (contrast.tratment)
Gordon K Smyth
smyth at wehi.EDU.AU
Thu Oct 7 01:07:22 CEST 2010
Dear Ashwin,
The Estrogen case study in the limma User's Guide runs without errors as
it is. So the problem is not with the case study.
You do not give us complete code for your own analysis (what is
'treatment' for example?), so there is no way for us to see where your
error is. My guess is that you have simply tried to set colnames(design)
equal to a vector of the wrong length. Obviously the number of column
names needs to equal the number of columns.
Best wishes
Gordon
> Date: Tue, 5 Oct 2010 15:37:57 -0500
> From: ashwin Vishnuvardhana <ashwin4bioinformatics at gmail.com>
> To: bioconductor at stat.math.ethz.ch
> Subject: [BioC] Need help in Anova design (contrast.tratment)
> Message-ID:
> <AANLkTin85YQL7YCCwp3fRJCVmtCCdqMKknyud++zE1_n at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi,
>
> I am working on 2x2 Factorial Experiment(ANOVA With interaction factor)and
> following Limma user guide( chapter 11.4 Estrogen Data). Basically I am
> interested in knowing how ?gender? variable is effecting outcome of
> experiment(please see attached file for sample information) is effecting
>
> But I am getting error at
>
> ?colnames(design)?
>
> *Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array
> extent*
>
> * *
>
> *This is list of R codes that I ran for getting to this point *
>
>
>
> ? targets <- readTargets("phenoData.txt",sep=",",row.names="filename")
>
> ? contrasts(treatments) <-
> cbind(Type=c(0,0,0,0,1,1),MMut=c(0,1,0,0,0,0),FWT=c(0,0,1,0,0,0),MWT
> =c(1,0,0,0,0,0),FMut=c(0,0,0,1,0,0),NonTgM=c(0,0,0,0,0,1),NonTgF=c(0,0,0,0,1,0))
>
>
> ? > contrasts(treatments)
>
> ? Gender MMut FWT MWT FMut
>
> ? MMut 0 0 0 1 0
>
> ? MWT 0 1 0 0 0
>
> ? FMut 0 0 1 0 0
>
> ? FWT 0 0 0 0 1
>
> ? NonTGM 1 0 0 0 0
>
> ? NonTGF 1 0 0 0 0
>
>> design <- model. Matrix(~treatments)
>
>> design
>
> (Intercept) treatments Type treatmentsMMut treatmentsFWT treatmentsMWT
> treatmentsFMut
>
> 1 1 0 0 0
> 1 0
>
> 2 1 0 0 0
> 1 0
>
> 3 1 0 0 0
> 1 0
>
> 4 1 0 0 0
> 1 0
>
> 5 1 0 1 0
> 0 0
>
> 6 1 0 1 0
> 0 0
>
> 7 1 0 1 0
> 0 0
>
> 8 1 0 1 0
> 0 0
>
> 9 1 0 0 1
> 0 0
>
> 10 1 0 0 1
> 0 0
>
> 11 1 0 0 1
> 0 0
>
> 12 1 0 0 1
> 0 0
>
> 13 1 0 0 0
> 0 1
>
> 14 1 0 0 0
> 0 1
>
> 15 1 0 0 0
> 0 1
>
> 16 1 0 0 0
> 0 1
>
> 17 1 1 0 0
> 0 0
>
> 18 1 1 0 0
> 0 0
>
> 19 1 1 0 0
> 0 0
>
> 20 1 1 0 0
> 0 0
>
> 21 1 1 0 0
> 0 0
>
> 22 1 1 0 0
> 0 0
>
> 23 1 1 0 0
> 0 0
>
> 24 1 1 0 0
> 0 0
>
>
>
> Any help is greatly appreciated.
>
>
>
> Ash
> -------------- next part --------------
> Type Filename Gender
> 1Mut-F1 1Mut-F1.CEL F
> 1Mut-F3 1Mut-F3.CEL F
> 1Mut-M4 1Mut-M4.CEL M
> 1Mut-M5 1Mut-M5.CEL M
> 6 WT-F2 6 WT-F2.CEL F
> 6 WT-F3 6 WT-F3.CEL F
> 6 WT- M2 6 WT- M2.CEL M
> 6 WT - M3 6 WT - M3.CEL M
> 24 WT-F4 24 WT-F4.CEL F
> 24 WT-M3 24 WT-M3.CEL M
> 24 WT-M4 24 WT-M4.CEL M
> 101Mut -F1 101Mut -F1.CEL F
> 101Mut -F2 101Mut -F2.CEL F
> 101Mut -M1 101Mut -M1.CEL M
> 101Mut-M2 101Mut-M2.CEL M
> Non-Tg-M1 Non-Tg-M1.CEL M
> Non-Tg-M2 "Non-Tg-M2,CEL" M
> Non-Tg-F2 Non-Tg-F2.CEL F
> Non-Tg-F3 Non-Tg-F3.CEL F
>
> ------------------------------
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list