How does MixedModels.jl initialize model parameters for optimization?

Hi, I’m curious about how MixedModels.jl initialize model parameters for optimization.

From page 12 of this document

This template contains three types of elements: structural zeros (denoted by .), off- diagonal covariance parameters (initialized at 0), and diagonal variance parameters (initialized at 1).

Looks like they initialize like this: if the model has a random intercept and a random slope, then they would initialize the covariance matrix of the random effects using a 2 by 2 identify matrix. Question 1: Is my understanding correct?

By reading the code, it seems like this is where they initialize. But it looks like it only initializes the random effects part, not the fixed effect parameters. Question 2: Did they leave the fixed effect parameters uninitialized (so the starting point will be picked by the solver)? Or am I missing anything?

1 Like

For linear mixed models, the covariance of the random effects are indeed initialized as identity matrices (well, technically the lower Cholesky factor thereof). The fixed effect parameters don’t need to initialized because they’re not optimized – they are solved directly (non iteratively).