d to obtain the optimal variance ratio $\gamma=\frac{\sigma_g^2}{\sigma^2}$.</p>

<p>Now, $ SX = 0 $ means that rows of $ S $ are in the orthogonal complement of $ \mathrm{colspace}(X),\  $ and if $X$ has $D$ linearly independent columns, rank of $S$ can’t be more than $ N - D$. It makes sense to take $S$ with this maximal rank. And because of this, the number of individuals is effectively reduced from $N$ to $N-D$.</p>

<p>Thus the REML estimate of $\gamma$ is just the ML estimate with $Sy$ instead of $y