1
$\begingroup$

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

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ 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? $\endgroup$
    – Mr.M
    Commented Dec 5, 2019 at 3:59
  • $\begingroup$ Once you have more than one probe/location you benefit from using the eBayes framework that lmFit() facilitates. $\endgroup$
    – Devon Ryan
    Commented Dec 5, 2019 at 8:10
  • $\begingroup$ Can you elaborate more on the benefits of eBayes? $\endgroup$
    – Mr.M
    Commented Dec 9, 2019 at 1:04
  • $\begingroup$ 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. $\endgroup$
    – Devon Ryan
    Commented Dec 9, 2019 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.