I used limma to conduct a differential analysis. Everything worked fine but I can't seem to find something that explains what is going on behind the scenes. How does limma calculate the logFC? I have three replicates in my data and I applied limma (contrast) to the full dataset as well as per replicate. For the most part I get the same logFC but some of them are different. Can someone explain how limma calculates the logFC? Is there a formula I can refer to?

Thank you. Okay, so I calculated the means and found the difference between the two conditions but there are not the same. The difference is slight but I was just wondering if you knew what causes that.

limma computes logFC by fitting a linear model to the log-expression values. Even the title of the package tells you that!

The linear model computation takes into account precision weights, inter-gene correlation, missing values and multiple model terms. Except in simple cases (the example that James gives is one), the result is not equivalent to a simple formula that you can repeat in Excel.

Thank you. Okay, so I calculated the means and found the difference between the two conditions but there are not the same. The difference is slight but I was just wondering if you knew what causes that.