Maximum likelihood estimator in both sides of the equation

24 Views Asked by At

I am following Mixed Models theory and applications with r, and there is an MLE that I am struggling to get, and it seems that the parameter appears in both sides of the equation.

We have the model $Y_i=X_i\beta + Z_ib_i+\epsilon_i$, where $\epsilon_i \sim N(0,\sigma^2I)$, where $\beta$ is the vector of fixed effects and $b_i$ is the vector of random effects, with $D=\dfrac{1}{\sigma^2}D_*=\dfrac{1}{\sigma^2}Cov(b_i)$. Therefore, $D$ is a function of $\sigma^2$. Define $V_i=\sigma^2(I+Z_iDZ_i')=Var(Y_i)$. The likelihood would be:

enter image description here The author ignores the constant parts of the likelihood as they fall off when deriving the expression wrt $\theta$ anyway.

Next, we would like to find MLE for $\sigma^2,\beta,vech(D)$, where $vech(D)$ is the elements under the diagonal of $D$, sorted in a horizontal vector (see here).
According to the authors, the maximum likelihood for $\sigma^2$ is the following: enter image description here

I am currently failing to understand the expression above. First, from what I understand, $D$ includes $\sigma^2$, and therefore $\sigma^2$ is not isolated. Second, I got different results, the derivation seems off.
$$ \dfrac{\partial [\log \sigma^2]}{\partial \sigma^2} = \dfrac{1}{\sigma^2} $$ And, using the identity from here for the derivative of $\log\det(X)$, plus the fact that the resulting matrix is symmetric: $$ \dfrac{\partial [\log \det (I+Z_i\dfrac{D_*}{\sigma^2}Z_i')}{\partial \sigma^2} = [\dfrac{1}{\sigma^2}Z_i\dfrac{D_*}{\sigma^2}Z_i']^{-1} = \sigma^2 (Z_iDZ_i')^{-1} $$ Next, since $\dfrac{\partial A(\theta)^{-1}}{\partial \theta} = A^{-1} \dfrac{\partial A}{\partial \theta}A^{-1}$ we get that $$ \dfrac{1}{\sigma^2}\times\dfrac{\partial [\sum_{i} e_i' (I+Z_iDZ_i')^{-1}e_i]}{\partial \sigma^2} = \dfrac{1}{\sigma^2} \times \sum_{i} e_i' (I+Z_iDZ_i')^{-1} \dfrac{1}{\sigma^2}Z_iDZ_i'(I+Z_iDZ_i')^{-1}e_i $$

And together we get by maximizing the derivative $$ 0=\dfrac{N}{\sigma^2}+\sigma^2(Z_iDZ_i)^{-1}+\sum_i e_i' (I+Z_iDZ_i')^{-1} \dfrac{1}{\sigma^2}Z_iDZ_i'(I+Z_iDZ_i')^{-1}e_i + (\dfrac{1}{\sigma^2})^2 e_i' (I+Z_iDZ_i')^{-1}e_i $$

Therefore, I am failing to get the expected maximum likelihood expression according to the author.