Review of RE covariance matrices (\(\Sigma\))

Correlation structures in lme

library(nlme)
data(Nile)
nile <- data.frame(date = 1871:1970, flow = c(Nile))
fit1 <- gls(flow ~ date, correlation = corAR1(), data = nile)

R-side modeling

Correlation structures in lme4

Correlation structures in glmmTMB: native

library(glmmTMB)
nile$dummy <- factor(1)
fit2 <- glmmTMB(flow ~ date + ar1(factor(date) + 0 | dummy),
                data = nile,
                dispformula = ~ 0,
                REML = TRUE)
## Warning in finalizeTMB(TMBStruc, obj, fit, h, data.tmb.old): Model convergence
## problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
## Warning in finalizeTMB(TMBStruc, obj, fit, h, data.tmb.old): Model convergence
## problem; false convergence (8). See vignette('troubleshooting'),
## help('diagnose')

Correlation structure via smooths

mgcv smooths

Reduced-rank (factor-analytic) smooths

sdmTMB

spaMM

pedigrees etc.

refs