[BioC] extract lmFit results?

James W. MacDonald jmacdon at med.umich.edu
Fri Feb 17 21:11:38 CET 2006


Hi Jianping,

Jianping Jin wrote:
> Thanks James!
> 
> Please forgive my ignorance if I am wrong. I knew "fit$coefficients" stuff. 
> That just give me "coefficients". Is that "b" in y = a + bx? It must be 
> more complicated than that I guess. In my case I just used default "design" 
> in fitting as below:

Well, that formula is conventionally used to describe a linear 
regression where there is some concept of slope. We are fitting an ANOVA 
model, and since there is no ordering of the factor levels, there is no 
concept of slope. A more conventional formula for ANOVA (without the 
subscripts) would be something like

y = a + b + error

The coefficients would correspond to 'a' and 'b', which depending on the 
design matrix can mean different things.

> 
> fitR <- lmFit(RG$R, ndups=2, spacing=722, correlation=0.5205939)

Hmmm. I haven't done any cDNA work in years, but I don't think that 
looks right. If I am not mistaken, what you are doing is fitting a 
one-sample t-test on just the cy5 (or is cy3 red? I can never remember) 
values which is usually not what you want. The convention is to fit a 
one-sample t-test on the log ratios, which then tests to see if the 
average log ratio is different from zero (which corresponds to testing 
if the average fold change is different from one).

The model here would be

y = a + error


> 
> What if I am interested in getting all "y" values for each gene in each 
> chip after lmFit fitting? Do I need to calculate them out following some 
> formula? Or I can extract them from somewhere within the limma package?

If by 'y' values you mean the fitted values, you would get those from 
the fit$coefficients, which in your case should just be a vector, one 
value per gene.

HTH,

Jim



> 
> Thanks again!
> 
> Jianping
> 
> --On Friday, February 17, 2006 1:27 PM -0500 "James W. MacDonald" 
> <jmacdon at med.umich.edu> wrote:
> 
> 
>>Jianping Jin wrote:
>>
>>>Dear list,
>>>
>>>Could anyone point me out how to extract the results from lmFit? The
>>>on-line document said "the probe-wise fitted model results are stored in
>>>a  compact form". What I wanted to get is ALL data values after linear
>>>model  normalization instead of going through all limma processes.
>>
>>The results are output in a named list. As with all named lists, you can
>>extract the names using names(listname). If, for example, your lmFit()
>>output is called 'fit', you can get information in several ways:
>>
>>names(fit) ## gives names
>>fit ## outputs first 10 or so values in each list component
>>fit$coefficients ##extract coefficients
>>fit$p.value ## p-values
>>etc.
>>
>>See ?list, ?"[["  for more information.
>>
>>HTH,
>>
>>Jim
>>
>>
>>
>>>Thanks in advance!
>>>
>>>Jianping
>>>
>>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>x Jianping Jin Ph.D.            x
>>>x Bioinformatics scientist      x
>>>x Center for bioinformatics     x
>>>x 3133 Bioinformatics Building  x
>>>x CB# 7104                      x
>>>x University of North Carolina  x
>>>x Chapel Hill, NC 27599         x
>>>x Tel: (919)843-6105            x
>>>x Fax: (919)843-3103            x
>>>x E-mail: jjin at email.unc.edu    x
>>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>
>>>_______________________________________________
>>>Bioconductor mailing list
>>>Bioconductor at stat.math.ethz.ch
>>>https://stat.ethz.ch/mailman/listinfo/bioconductor
>>
>>
>>--
>>James W. MacDonald, M.S.
>>Biostatistician
>>Affymetrix and cDNA Microarray Core
>>University of Michigan Cancer Center
>>1500 E. Medical Center Drive
>>7410 CCGC
>>Ann Arbor MI 48109
>>734-647-5623
> 
> 
> 
> 
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> x Jianping Jin Ph.D.            x
> x Bioinformatics scientist      x
> x Center for bioinformatics     x
> x 3133 Bioinformatics Building  x
> x CB# 7104                      x
> x University of North Carolina  x
> x Chapel Hill, NC 27599         x
> x Tel: (919)843-6105            x
> x Fax: (919)843-3103            x
> x E-mail: jjin at email.unc.edu    x
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor


-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list