Harnessing non linearity random effects
BIO 8940 - Lecture 8
2024-09-19
Difference between fixed and random effects
When to transform data?
Walkthrough Figure 1 ?
Get rid of non-significant fixed effects?
How to choose a link function? Why not using the default?
Can we go through example in Box 1?
Video game allowing you to dress-up anime style characters
An extension to Generalized linear model and an extension to linear mixed model
GLMM expresses the transformed conditional expectation of the dependent variable y as a linear combination of the regression variables X
Model has 3 components
\[ g(\mu_i) = \beta_0 + \beta_1 X_1 + ... + \beta_k X_k \]
and
\[ \mu_i = E(y_i | x_i) = g(\mu_i)^{-1} \]
In R:
glmer()
from lme4
📦 same as lmer()
but with a family
argumentglmmPQL()
from MASS
📦 (based on lme()
)glmmADMB()
from - glmmADMB
📦 works well and flexible be bewareglmmTMB()
from glmmTMB
📦 works well and flexible be bewareasreml()
from glmmTMB
📦 great but not-freeMCMCglmm()
from MCMCglmm
📦 great but Bayesianstan
: brms
, rethinking
, rstan
, …BUGS
: runjags
, rjags
, …Easy answer none or really few
More advanced answer I am not sure, it is complicated
Just check residuals I as usual
Warning
Generalized Linear Models do not care if the residual errors are normally distributed as long as the specified mean-variance relationship is satisfied by the data
A link function should map the stuctural component from \((-\infty,\infty)\) to the distribution interval (e.g. (0,1) for binomial)
So number of link function possible is extremley large.
Choice of link function heavily influenced by field tradiditon
For binomial models
Latent scale
Business as usual ?
Observed scale ??????
rptR
📦 is the easiest or QGGlmm
📦 (see associated citation for reference and explanations)Difference between marginalized and conditioned coefficients?
GLMMadaptive 📦 is the only way I know to do easily get marginalized coefficients
Walkthrough Example box 1
BIO 8940 - Lecture 8