text: user6590: I'm new on working with genetics data and I'm just wondering if I can use the lm function when I'm building my models or do I have to use lmFit function in limma package to build the models and what is the difference between the two packages in terms of performing linear regression models 
  
  user77: You can use either, but lmFit has the benefit of returning an object that can be used with eBayes() so you can pool information across genes/probes/whatever. lm() is a base R function applicable basically everywhere. lmFit() if from the limma package, so originally intended for microarray data, though these days pretty much everything omics is analyzed with it since sample sizes tend to be small so everyone want's to pool information for more statistical power.
  BTW, if you have methylation data then you'll want to fit data in logit space.
  
original_text: 6590: <p>I'm new on working with genetics data and I'm just wondering if I can use the <code>lm</code> function when I'm building my models or do I have to use <code>lmFit</code> function in limma package to build the models and what is the difference between the two packages in terms of performing linear regression models </p>
   77: <p>You can use either, but <code>lmFit</code> has the benefit of returning an object that can be used with <code>eBayes()</code> so you can pool information across genes/probes/whatever. <code>lm()</code> is a base R function applicable basically everywhere. <code>lmFit()</code> if from the limma package, so originally intended for microarray data, though these days pretty much everything omics is analyzed with it since sample sizes tend to be small so everyone want's to pool information for more statistical power.</p>
  
  <p>BTW, if you have methylation data then you'll want to fit data in logit space.</p>
  