Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-05T03:59:15.527Z
Answers.Text: Thanks, Devon for sharing your knowledge. I have a followup question. If I knew the probes (CpGs) that I wanna work with. Will that make a difference to decide which one I'm going to use?
Answers.UserDisplayName: Mr.M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-05T08:10:38.003Z
Answers.Text: Once you have more than one probe/location you benefit from using the eBayes framework that `lmFit()` facilitates.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-09T01:04:17.897Z
Answers.Text: Can you elaborate more on the benefits of eBayes?
Answers.UserDisplayName: Mr.M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-09T07:14:25.197Z
Answers.Text: Empirical Bayes methods allow you to increase your statistical power in the (likely) event that you have relatively few (less than hundreds) samples. For more information please see the limma paper.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-04T07:06:01.633Z
Answers.LastActivityDate: 2019-12-04T07:06:01.633Z
Answers.UserDisplayName: Devon Ryan
Body: <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>
  
Tags: <limma><linear-regression>
Title: Can I use a regular liner regression model when I'm working with DNA methylation data?
ThreadText: # Can I use a regular liner regression model when I'm working with DNA methylation data?
  
  (Asked by: username_0 on 2019-12-03)
  
  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
  
  **Tags:** limma, linear-regression
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-04. Score: 2
  
  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.
  
  > **Comments:**
  > **username_0**: Thanks, username_1 for sharing your knowledge. I have a followup question. If I knew the probes (CpGs) that I wanna work with. Will that make a difference to decide which one I'm going to use?  
  > **username_1**: Once you have more than one probe/location you benefit from using the eBayes framework that `lmFit()` facilitates.  
  > **username_0**: Can you elaborate more on the benefits of eBayes?  
  > **username_1**: Empirical Bayes methods allow you to increase your statistical power in the (likely) event that you have relatively few (less than hundreds) samples. For more information please see the limma paper.  
  
  ---
  
  