# Spherical Parameterization of Variance-Covariance Matrix in Mixed-Effects Regression

I wonder if someone can please help me with a passage on the article by José Pinheiro and Douglas Bates on unconstrained matrix parametrization. hat ties directly into the question.

Although the authors start with a given variance-covariance matrix, the idea is to parametrize an unknown matrix of random effects to produce positive semi-definite matrices that can be tested for likelihood.

The basic algebra is upper-case $L_i$ symbolizing the $i$ columns of the upper triangular Cholesky with lower-case $l_i$ denoting the parameters needed to represent the Cholesky matrix $L$ in spherical coordinates. As I understand it, $[l_i]_1$ corresponds to the norm of the column vector $L_i$ within the Cholesky $L$, while $[l_i]_j$ with $j>1$ are actual angles in counterclockwise Jacobi rotations (page 4), which are the basis for the geometric interpretation of the dot products resulting in scalar values $(\rho_{ij}$ - variances and covariances).

Since we don't know these parameters, the authors propose the following parametrization:

$$\theta_i=\log\left([l_i]_1\right),\quad i= 1,...,n$$

and

$$\theta _{n+(i-2)(i-1)/2+(j-1)} = \log\ \left( \frac{[l_i]_j}{\pi-[l_i]_j}\right), \quad i=2,...,n, \,j= 2,...,i.$$

The first parameter definition is clear - it ensures that the vectors will be positive.

As for the second rule, I am lost as to the subscripts of $\theta$. I understand that they apply to the angles of the spherical coordinates securing that they will be positive and bounded $(0,\pi]),$ but I don't see the subscripts in the $\theta _{n+(i-2)(i-1)/2+(j-1)}$ and would really appreciate some pointers.

If it helps the parameters that would correspond to a variance-covariance matrix, such in the post:

\begin{align} A&=\begin{bmatrix}1&1&1\\1&5&5\\1&4&14\end{bmatrix}=L^{T}L=\begin{bmatrix}1&0&0\\1&2&0\\1&2&3\end{bmatrix}\begin{bmatrix}1&1&1\\0&2&2\\0&0&3\end{bmatrix} \end{align}

with spherical coordinates,

$$\begin{bmatrix}1&\sqrt{5}&\sqrt{14}\\ 0&1.107&1.3\\ 0&0&0.983\end{bmatrix}$$

would be, as given by the authors, $$\theta = (0, \log(5)/2, \log(14)/2, -0.608, -0.348, -0.787)^\top.$$ These values correspond to the $\ln(\cdot)$ of the first three $[l_i]_1$ values, and the $\ln\left(\frac{[l_i]_j}{\pi-l_i]_j}\right)$ of all the other values.

Can the subscripts simply be a typo?

According to the article $θn+(i−2)(i−1)/2+(j−1)=log([li]jπ−[li]j)$
The folowing is true: $-0.608=log(1.107/(π-1.107))$
also is true that $1.107=exp(-0.608)*π/(1+exp(-0.608))$
• Thank you for your answer. I +1 honestly by mistake while reading your answer on my phone. I am sure it is more than deserved, even if it were just for the intention to help, but I don't follow your response. Do you go from $log([l_i]_j\pi - [l_i]_j) = log(1.107/(\pi - 1.107))$? I guess not, and I'm just stuck with the indexes not making sense. I'd appreciate it if you could be more descriptive, and I'd happily accept the answer once I understand it. – Antoni Parellada Sep 15 '15 at 12:21
I'm not sure what you think the subscripts should be, but they're really just a way to map the (i,j) location of the index in L into the linear array $\theta$. One thing to note is the authors don't mention that $\theta$ in this section is row-wise, not column-wise as defined earlier.