Good evening to everyone!
The limma package (and the related papers) defines the "random effect" in a mixed effect model as a "variable" (e.g. "patient_ID"). However, the lme4 package define the random effect as a coefficient of the model (intercept or slope) free to change based on a certain blocking variable. Then... what is a "random effect"? A whole variable or a coefficient?
In particular, in limma, it's the intercept or the slope (or both) that is free to change according to the block of the mixed effet model?
I got it wrong or there is some other information that I miss?
Thank you very much for your help
Leandro
Thank you so much Gordon for your answer and your time! This makes it much clearer...
Hovewer, beside the definition, there is still one question left open: "In particular, in limma, it's the intercept or the slope (or both) that is free to change according to the block of the mixed effet model?"
It is unclear to me what your question means so I have no way to answer it. limma linear models usually have an intercept, and may or might not have slopes, but neither are random.
I write here a quick example with lme4 mixed model to better expose my doubt.
If I write Y ~ factorX1 + (1 | factorX2) then I have multiple random intercept free to change according to X2. If I write Y ~ factorX1 + (factorX1 | factorX2) then it's the slope of X1 that is free to change according to X2. According to lme4 package, the coefficient is the random effect of the blocking variable (am I rigth?).
Now let's see it again but with limma sintax... I just have to write block=factorX2 to built a mixed model and (thanks to you) now I have clear that, in limma, this time is the block that is defined as the "random effect".
Hovewer, graphically speaking, this "random effect" of limma has a free intercept or a free slope?
limma is not equivalent to the lme4 package. At no stage does limma estimate intercepts that vary with block or slopes that vary with block.
limma does what the documentation says it does. The documentation says that it estimates intrablock correlations and that is indeed what it does.
Got it. Thank you really much for your time and your help!
Leandro