[BioC] Problem with lmfit

David martin vilanew at gmail.com
Mon Aug 9 15:50:33 CEST 2010


Thanks Paolo,
You are indeed right, limma is behaving strange with only 1 feature. The 
thing is that i'm testing a single gene over a large panel of samples 
(this is only a subset)..
thanks for letting me know

On 09/08/10 15:29, Paolo Innocenti wrote:
> Hi,
>
> I can reproduce the error, which seems to be caused by your
> expressionset having only one feature. If you try with 2 lines, it works:
>
> library(Biobase)
> library(limma)
> design <- matrix(c(1,0),ncol=2,nrow=5,byrow=T)
> design <- rbind(design,c(0,1),c(0,1))
> colnames(design) <- c("HEALTHY","DISEASE")
>
> # 2 (identical) features
>
> data <- matrix(rep(c(25.92000, 25.66667, 23.14667, 26.28667, 25.48667
> ,21.19000, 20.81000),2),nrow=2,ncol=7, byrow=T)
> mydata.eset=new("ExpressionSet",exprs=data)
> lmFit(mydata.eset, design=design)
>
> I have no idea if lmFit is meant to work with 1 feature (I guess it
> yield the same result as "lm"), but the error seem to be caused by the
> function "nonEstimable" called by limma (but I am no expert, someone
> else might want to comment on this).
>
> Hope this helps.
> paolo
>
> # lm code:
> y <- c(25.92000, 25.66667, 23.14667, 26.28667, 25.48667 ,21.19000,
> 20.81000)
> treat <- factor(c(rep("healthy",5),rep("dis",2)))
> summary(lm(y ~ treat))
>
>
> On 08/09/2010 02:59 PM, David martin wrote:
>> Hello,
>> I have a strange problem while fitting a design to my data. Here is the
>> output code. You can reproduce the problem by copy paste the code below.
>>
>>
>> > design
>> HEALTHY DISEASE
>> 1 1 0
>> 2 1 0
>> 3 1 0
>> 4 1 0
>> 5 1 0
>> 6 0 1
>> 7 0 1
>> attr(,"assign")
>> [1] 1 1
>> attr(,"contrasts")
>> attr(,"contrasts")$groups
>> [1] "contr.treatment"
>>
>> > exprs(mydata.eset)
>> healthy1 healthy2 healthy3 healthy4 N25 disease1 disease2
>> 1 25.92 25.66667 23.14667 26.28667 25.48667 21.19 20.81
>>
>> > lmFit(exprs(mydata.eset), design=design)
>> Error in fit$effects[(fit$rank + 1):narrays, , drop = FALSE] :
>> incorrect number of dimensions
>>
>>
>> ### Here is the code to reproduce the error
>> library(Biobase)
>> library(limma)
>> design <- matrix(c(1,0),ncol=2,nrow=5,byrow=T)
>> design <- rbind(design,c(0,1),c(0,1))
>> colnames(design) <- c("HEALTHY","DISEASE")
>> data <- matrix(c(25.92000, 25.66667, 23.14667, 26.28667, 25.48667
>> ,21.19000, 20.81000),nrow=1,ncol=7)
>> mydata.eset=new("ExpressionSet",exprs=data)
>> colnames(exprs(mydata.eset)) <-
>> c("healthy1","healthy2","healthy3","healthy4","healthy5","disease1","disease2")
>>
>>
>> lmFit(mydata.eset, design=design)
>>
>>
>> thanks for leting me know,
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>



More information about the Bioconductor mailing list