Estimate the parameters of the following linear mixed model, using AIREML algorithm:
$$Y = X\beta + \omega_1 + \ldots + \omega_k + \varepsilon$$
with $\omega_i \sim N(0,\tau_i K_i)$ for $i \in 1, \dots,k$ and
$\varepsilon \sim N(0,\sigma^2 I_n)$. The variance matrices $K_1$, ..., $K_k$, are specified through the parameter K.
If EMsteps is positive, the function will use this number of EM steps to compute a better starting point
for the AIREML algorithm. Setting EMsteps to a value higher than max_iter leads to an EM optimization.
It can happen that after an AIREML step, the likelihood did not increase: if this
happens, the functions falls back to EMsteps_fail EM steps. The parameter EM_alpha can be set to
a value higher than $1$ to attempt to accelerate EM convergence; this could also result in uncontrolled
behaviour and should be used with care.
After convergence, the function also compute Best Linear Unbiased Predictors (BLUPs) for
$\beta$ and $\omega$, and an
estimation of the participation of the fixed effects to the variance of $Y$.