[BioC] lmFit simple design or contrast

Beatriz ramos.beatriz at gmail.com
Mon Nov 21 12:18:08 CET 2005


Oh! sorry about the email, it displayed correctly when I sent it to you

Maybe I need to know more about statistic and linear models, but thank you


Björn Usadel wrote:

> Hi Beatriz,
>
> your mail is very hard to read. If you have a look at section 8.4 
> again where supposedly a similar design as yours was used
> "For the first approach, the treatment-contrasts parametrization, the 
> design matrix should be
> as follows:
> > design
> WT MUvsWT
> Array1 1 0
> Array2 1 0
> Array3 1 1
> Array4 1 1
> Array5 1 1
> Here the first coefficient estimates the mean log-expression for wild 
> type mice and plays the
> role of an intercept."
>
> And you plotted the first coefficient. However, you were probably more 
> interest in coeffient2
> if you do type
> >fita
> and then have a look at the slots, you can see that in coeffiecients 
> there is a column labeled MUvsWT which is probably what you wanted to 
> see:
> you can access it with fita$coeff[,2] or fita$coeff[,"MUvsWT"]
>
> also str(objects) can be one of your friends....
>
> Cheers,
> björn
>
>
>> Hi, everybody
>>
>> I've read "limma: Linear Models for Microarray Data User's Guide" 
>> several times and I can't understood when you should use a simple 
>> design or a contrast matrix.
>>
>> I have done my own experiments with the explanation of page 31 ("Two 
>> Groups: Affymetrix") and I can do it and obtain results but I don't 
>> understand why.
>>
>> My experiment is
>>
>> FileName
>>
>>     
>>
>> Array
>>
>>     
>>
>> Target
>>
>> File1
>>
>>     
>>
>> 1
>>
>>     
>>
>> Mu
>>
>> File2
>>
>>     
>>
>> 1
>>
>>     
>>
>> WT
>>
>> File3
>>
>>     
>>
>> 2
>>
>>     
>>
>> Mu
>>
>> File4
>>
>>     
>>
>> 2
>>
>>     
>>
>> WT
>>
>> File5
>>
>>     
>>
>> 3
>>
>>     
>>
>> Mu
>>
>> File6
>>
>>     
>>
>> 4
>>
>>     
>>
>> WT
>>
>>
>> I have 2 questions:
>>
>> 1) When I design the design matrix with the instructions of this 
>> user's guide, I obtain
>>     WT MUvsWT
>> [1,]  1   1
>> [2,]  1   0
>> [3,]  1   1
>> [4,]  1   0
>> [5,]  1   1
>> [6,]  1   0
>> but I don't understand why you write 1s and 0s (I know column WT is 
>> logIntensity and MUvsWT logRatio, but  I don't understand why you put 
>> this number)
>> do you consider that your WT intensity is always 10' (log10=1)?
>> and MUvsWT is 10 or 1 (log10=1, log1=0)?
>>
>>
>> 2) When I use a simple design and plot the results with plotMA(fita), 
>> I can see a plot with M label in the Y-axe and A label in the X-axe 
>> but the graphical representation is very similar to Intensity vs 
>> Intensity plot (M are the log2ratio and A the average of control and 
>> experiment intensity values)
>>
>>    
>> -------------------------------------------------------------------------- 
>>
>>
>>  
>>
>>> design <- cbind(WT=1, MUvsWT=c(1,0,1,0,1,0))
>>> design
>>>   
>>
>>
>>             WT MUvsWT
>>        [1,]  1   1
>>        [2,]  1   0
>>        [3,]  1   1
>>        [4,]  1   0
>>        [5,]  1   1
>>        [6,]  1   0
>>
>>  
>>
>>> fita <- lmFit(eSet,design)
>>> fita <- eBayes(fita)
>>>   
>>
>>        
>> -------------------------------------------------------------------------- 
>>
>>
>>
>> When I use a contrast matrix and plot the results with plotMA(fit2), 
>> I can see a plot with M label in the Y-axe and A label in the X-axe 
>> and the graphical representation is a real MA plot
>>
>>    
>> -------------------------------------------------------------------------- 
>>
>>
>>  
>>
>>> design2 <- cbind(MU=c(1,0,1,0,1,0),WT=c(0,1,0,1,0,1))
>>> design2
>>>   
>>
>>
>>             MU WT
>>        [1,]  1  0
>>        [2,]  0  1
>>        [3,]  1  0
>>        [4,]  0  1
>>        [5,]  1  0
>>        [6,]  0  1
>>
>>  
>>
>>> fit <- lmFit(eSet,design2)
>>> contraste <- makeContrasts(MUvsWT=MU-WT, levels=design2)
>>> contraste
>>>   
>>
>>
>>           MUvsWT
>>        MU      1
>>        WT     -1
>>
>>  
>>
>>> fit2 <- contrasts.fit(fit,contraste)
>>> fit2 <- eBayes(fit2)
>>>   
>>
>>    
>> -------------------------------------------------------------------------- 
>>
>>
>>
>> why you obtain diferent plots? is because of the design matrix?
>>
>> Thanks a lot for your help
>>
>> Beatriz
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>  
>>
>
>



More information about the Bioconductor mailing list