[BioC] limma lmFit error

Gordon Smyth smyth at wehi.EDU.AU
Fri Feb 16 00:53:09 CET 2007


Hi Ben,

You've actually run into two problems. One problem is that lmFit() is 
refusing to fit a model when some of the columns of the design matrix 
are not estimable. This is a bug which I'll have to fix.

The other problem is that your design has non-estimable columns in 
the first place. As Jose de las Heras has pointed out, this is 
because your design is "unconnected". Instead of having one reference 
sample, you have three different reference samples, one for each of 
days 2, 4 and 7.

Usually in these case I advise people to construct the design matrix 
by hand. In your case, a way to proceed is to construct separate 
design matrices for the different days then put them together as 
below. This works because you have a block of day 4 arrays in your 
experiment followed by day 7 followed by day 2.

Best wishes
Gordon

  > Day2 <- grep("D2",targets$Cy3)
  > Day4 <- grep("D4",targets$Cy3)
  > Day7 <- grep("D7",targets$Cy3)
  > design2 <- modelMatrix(targets[Day2,],ref="D2R")
  > design4 <- modelMatrix(targets[Day4,],ref="D4R")
  > design7 <- modelMatrix(targets[Day7,],ref="D7R")
  > design <- blockDiag(design4,design7,design2)
  > design
    D4M D7M D2M
1    1   0   0
2   -1   0   0
3    1   0   0
4   -1   0   0
5    0   1   0
6    0  -1   0
7    0   1   0
8    0  -1   0
9    0   0  -1
10   0   0   1
11   0   0  -1
12   0   0   1

At 10:00 PM 15/02/2007, bioconductor-request at stat.math.ethz.ch wrote:
>Date: Wed, 14 Feb 2007 14:22:41 +0100
>From: Ben Nota <be.nota at ecology.falw.vu.nl>
>Subject: [BioC] limma lmFit error
>To: bioconductor at stat.math.ethz.ch
>Message-ID: <45D30D20.7030309 at ecology.falw.vu.nl>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Dear BioC,
>
>I'm getting an error using the lmFit function within limma. I'm using R
>2.4.0 with limma version 2.9.1.
>
>A little background about the experiment:
>
>I use two color agilent arrays containing duplicate spots. I have metal
>exposure compared to non exposed (= reference) at 3 different time
>points (2, 4 and 7 days). Four bio-replicates per time point.
>
>Explanation of RNA sample names: Day 2 reference (D2R) vs. Day 2 Metal
>(D2M), Day 4 reference (D4R) vs. Day 4 Metal (D4M), etc.
>
>I normalized my data using loess
>
>My targets look like this:
>
>  > targets
>       Array     FileName Cy3 Cy5     Date
>1  Array15A Array15A.txt D4R D4M 31/01/07
>2  Array15B Array15B.txt D4M D4R 31/01/07
>3  Array17A Array17A.txt D4R D4M 31/01/07
>4  Array17B Array17B.txt D4M D4R 31/01/07
>5  Array46A Array46A.txt D7R D7M 31/01/07
>6  Array46B Array46B.txt D7M D7R 31/01/07
>7  Array47A Array47A.txt D7R D7M 31/01/07
>8  Array47B Array47B.txt D7M D7R 31/01/07
>9  Array10A Array10A.txt D2M D2R 17/10/06
>10 Array11A Array11A.txt D2R D2M 17/10/06
>11 Array12A Array12A.txt D2M D2R 16/11/06
>12 Array12B Array12B.txt D2R D2M 16/11/06
>
>My design:
>
>  > design<-modelMatrix(targets,ref="D2R")
>Found unique target names:
>  D2M D2R D4M D4R D7M D7R
>  > design
>    D2M D4M D4R D7M D7R
>1    0   1  -1   0   0
>2    0  -1   1   0   0
>3    0   1  -1   0   0
>4    0  -1   1   0   0
>5    0   0   0   1  -1
>6    0   0   0  -1   1
>7    0   0   0   1  -1
>8    0   0   0  -1   1
>9   -1   0   0   0   0
>10   1   0   0   0   0
>11  -1   0   0   0   0
>12   1   0   0   0   0
>
>And my correlation is calculated:
>
>  > cor<-duplicateCorrelation(MA,design,ndups=2)
>  > cor$consensus.correlation
>[1] 0.8890682
>
>But if I want to fit my linear model I'll get the following error message:
>
>  > fit<-lmFit(MA, design, ndups=2,cor=cor$consensus.correlation)
>Coefficients not estimable: D4R D7R
>Error in dimnames(cov.coef) <- list(coef.names, coef.names) :
>         length of 'dimnames' [1] not equal to array extent
>
>Does anybody knows what this error means and what I'm doing wrong? I
>hope so!
>
>Thanks in advance!
>
>Best regards, Ben.
>
>--
>Benjamin Nota
>Vrije Universiteit
>Department of Animal Ecology
>De Boelelaan 1085
>1081 HV AMSTERDAM, The Netherlands
>Tel:  +31 (0)20-5987217
>Fax: +31 (0)20-5987123
>ben.nota at falw.vu.nl
>
>http://www.bio.vu.nl/do/



More information about the Bioconductor mailing list