mixed - Stata
mixed - Stata
mixed - Stata
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
46 <strong>mixed</strong> — Multilevel <strong>mixed</strong>-effects linear regression<br />
Efficient methods for computing (9) and (10) are given in chapter 2 of Pinheiro and Bates (2000).<br />
Namely, for the two-level model, define ∆ to be the Cholesky factor of σɛ 2Σ−1 , such that σɛ 2Σ−1 =<br />
∆ ′ ∆. For j = 1, . . . , M, decompose<br />
[ ] [ ]<br />
Zj R11j<br />
= Q<br />
∆ j<br />
0<br />
by using an orthogonal-triangular (QR) decomposition, with Q j a (n j + q)-square matrix and R 11j<br />
a q-square matrix. We then apply Q j as follows:<br />
[ ] [ ] [ ] [ ]<br />
R10j<br />
= Q ′ Xj c1j<br />
j ;<br />
= Q ′ yj<br />
j<br />
R 00j 0 c 0j 0<br />
Stack the R 00j and c 0j matrices, and perform the additional QR decomposition<br />
⎡<br />
⎤<br />
R 001 c 01 [ ]<br />
⎣<br />
.<br />
⎦ R00 c<br />
. = Q 0<br />
0<br />
0 c 1<br />
c 0M<br />
R 00M<br />
Pinheiro and Bates (2000) show that ML estimates of β, σɛ 2 , and ∆ (the unique elements of ∆,<br />
that is) are obtained by maximizing the profile log likelihood (profiled in ∆)<br />
L(∆) = n 2 {log n − log(2π) − 1} − n log ||c 1|| +<br />
where || · || denotes the 2-norm. Following this maximization with<br />
REML estimates are obtained by maximizing<br />
followed by<br />
L R (∆) = n − p<br />
2<br />
M∑<br />
log<br />
det(∆)<br />
∣det(R 11j ) ∣ (11)<br />
j=1<br />
̂β = R −1<br />
00 c 0; ̂σ 2 ɛ = n −1 ||c 1 || 2 (12)<br />
{log(n − p) − log(2π) − 1} − (n − p) log ||c 1 ||<br />
− log |det(R 00 )| +<br />
M∑<br />
log<br />
det(∆)<br />
∣det(R 11j ) ∣<br />
j=1<br />
̂β = R −1<br />
00 c 0; ̂σ 2 ɛ = (n − p) −1 ||c 1 || 2<br />
For numerical stability, maximization of (11) and (13) is not performed with respect to the unique<br />
elements of ∆ but instead with respect to the unique elements of the matrix square root (or matrix<br />
logarithm if the matlog option is specified) of Σ/σɛ 2 ; define γ to be the vector containing these<br />
elements.<br />
Once maximization with respect to γ is completed, (γ, σɛ 2 ) is reparameterized to {α, log(σ ɛ )},<br />
where α is a vector containing the unique elements of Σ, expressed as logarithms of standard<br />
deviations for the diagonal elements and hyperbolic arctangents of the correlations for off-diagonal<br />
elements. This last step is necessary 1) to obtain a joint variance–covariance estimate of the elements<br />
of Σ and σɛ 2 ; 2) to obtain a parameterization under which parameter estimates can be interpreted<br />
individually, rather than as elements of a matrix square root (or logarithm); and 3) to parameterize<br />
these elements such that their ranges each encompass the entire real line.<br />
(13)