My question relates to a computation technique exploited in geoR:::.negloglik.GRF
or geoR:::solve.geoR
.
In a linear mixed model setup: $$ Y=X\beta+Zb+e $$ where $\beta$ and $b$ are the fixed and random effects respectively. Also, $\Sigma=\text{cov}(Y)$
When estimating the effects, there is a need to compute
$$
(X'\Sigma^{-1}X)^{-1}X'\Sigma^{-1} Y
$$
which can normally be done using something like solve(XtS_invX,XtS_invY)
, but sometimes $(X'\Sigma^{-1}X)$ is almost non-invertible, so geoR
employ the trick
t.ei=eigen(XtS_invX)
crossprod(t(t.ei$vec)/sqrt(t.ei$val))%*%XtS_invY
(can be seen in geoR:::.negloglik.GRF
and geoR:::.solve.geoR
)
which amounts to decomposing
$$
(X'\Sigma^{-1}X)=\Lambda D \Lambda^{-1}\\
$$
where $\Lambda'=\Lambda^{-1}$ and therefore
$$
(X'\Sigma^{-1}X)^{-1}=(D^{-1/2}\Lambda^{-1})'(D^{-1/2}\Lambda^{-1})
$$
Two questions:
- How does this eigen decomposition helps inverting $(X'\Sigma^{-1}X)$?
- Is there any other viable alternatives (that is robust and stable)? (e.g.
qr.solve
orchol2inv
?)