I'm starting to study the Linear Mixed Models (LMM) and the Generalized Mixed Models (GLMM) and I got kinda confused. If I want to apply logistic regression to a longitudinal data, I need to add random effects. But which one should I use? LMM or GLMM? Whats the difference of using logistic regression with LMM and with GLMM?
1 Answer
The language is very confusing and it doesn't help that different software packages and different authors use different names and that the acronyms (GLM, LM, LME, LMM, GLMM and more) are inconsistent as well.
Within your sets of names, the following should help:
Linear model - ordinary least squares regression, ANOVA, ANCOVA; the dependent variable is continuous, errors are independent
Generalized linear model - Logistic regression and other methods; dependent variable may be categorical, errors are independent
Linear mixed model - dependent variable is continuous, errors need not be independent; good for longitudinal data (also other kinds, such as clustered data)
Generalized linear mixed model - depenedent variable need not be continuous, errors need not be independent.
-
$\begingroup$ You mentioned that logistic regression can be used in GLM, but that does not take in account the random effects. If I want to use random effects, the only difference between LMM and GLMM is that the dependent variable is continous in the case of LMM and continous or other type in GLMM? It all comes down to what type is the depedent variable , right? $\endgroup$ Commented Dec 10, 2019 at 14:28
-
$\begingroup$ Yes, read the last paragraph of my answer. $\endgroup$ Commented Dec 10, 2019 at 15:38