Gaussian linear mixed models (GLMMs) Flashcards
Two-stage sampling scheme
1: m groups
2: ni units ∀ i=1,…m
Two-level hierarchical units and regressors
1: ni observations ∀ i=i,..m
2: m groups, regressors that are common for all observations in the same group
IntraClass Correlation (ICC) for intercept-only GLMM
cor(Yij, Ylh) = τ02 / (τ02 + σ2)
Random intercept and slope GLMM model
Yij = β0 + γ0i + β1 xij + γ1ixij+ εij = β0i + β1i xij + εij
∀ j=1,…ni, i=1,…m
- E[Yij] = β0 + β1 xij
- E[Yij|γ0i] = β0i + β1i xij
- Var(Yij) = σ2 + τ02 + τ12xij2 + 2τ01xij
- Cov(Yij, Ylh) = τ02 + + τ12xijxlh + τ01(xij+xlh) if i=l, 0 otherwise
GLMM general definition
Y = Xβ + Uγ + ε
- Xnxp
- βp=k+1
- εnx1 ∼ Nn(0, σ2In)
- Unxm(q+1) = blockdiag(U1,…Um)
- γm(q+1)x1 ∼ Nm(q+1)(0, G=blockdiag(Q,…Q)) independent of ε
- E[Y] = Xβ
- E[Y|γ] = Xβ + Uγ
- cov(Y) = V = UGU’ + σ2In
- cov(Y|γ) = σ2In
Marginal and conditional formulations of GLMMs
Y ∼ Nn(Xβ, V=UGU’+R)
Y|γ ∼ Nn(Xβ + Uγ, R) and γ ∼ Nq(0, G)
GLMMs seen as GLMs
ε* = Uγ + ε ∼ Nn(0, V = UGU’+σ2In)
Y = Xβ = ε* ∼ Nn(Xβ, V)
Extension of GLMMs to heteroschedasticity and error dependence
Y = Xβ + Uγ + ε
- ε ∼ Nn(0, R)
- Rnxn = blockdiag(R1,…Rm)
Heteroschedasticity: Ri = σ2Ini, stratification of variances
Error correlation: Ri for autocorrelation (ARMA)
To avoid overparametrization it is important to put emphasis either on R or UiQUi’ (one emphasised and the other simple since now V = UGU’ + R)
GLMMs fitting in R
lme(fixed=y~lvl1+lvl2, random=~lvl1|group, method=”REML”)
- random = pDiag(~lvl1) defines a diagonal Q
- weights = varIdent(form=~1|strata) defines heteroschedasticity between strata
GLMMs coefficients in R
fixef(fit) #Beta
ranef(fit) #Gamma
coef(fit) #Conditional formulation, betai + gammai
Hypothesis testing on Betas in R
- H0: Betai = 0
summary(fit) #Check t
anova(fit, type=”marginal”) #t2 from summary - H0: CBeta = 0
anova(fit, L=C) #Valid only for one level regressors at a time, not mixed! - Nested models:
anova(fitmin, fitmax) #Valid only if method=”ML” for both!
Hypothesis testing on Gammas in R
- H0: uncorrelated gammas
anova(fit_pDiag, fit_Default) - H0: excluding gammai
L = anova(fit_excluded, fit_not)$L.Ratio[2]
p = 0.5*(1-pchisq(L, r-1))+0.5(1-pchisq(L, r)) - H0: strata heteroschedasticity is as valid as group heteroschedasticity
anova (fit_strata, fit_group) - H0: homoschedasticity is as valid as heteroschedasticity
anova(fit_homo, fit_het)
Number of parameters of matrix Q
- DProportional to identity matrix: 1
- Compound symmetry: 2
- Diagonal: q
- Identical covariance, different variance: q+1
- Unstructured: 1/2 q(q+1)
Total number of variance parameters: parameters of Q + 1 (σ2)