mixed - Stata
mixed - Stata
mixed - Stata
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>mixed</strong> — Multilevel <strong>mixed</strong>-effects linear regression 19<br />
Example 5<br />
Returning to our productivity data, we now add random coefficients on hwy and unemp at the<br />
region level. This only slightly changes the estimates of the fixed effects, so we focus our attention<br />
on the variance components:<br />
. <strong>mixed</strong> gsp private emp hwy water other unemp || region: hwy unemp || state:,<br />
> nolog nogroup nofetable<br />
Mixed-effects ML regression Number of obs = 816<br />
Wald chi2(6) = 17137.94<br />
Log likelihood = 1447.6787 Prob > chi2 = 0.0000<br />
Random-effects Parameters Estimate Std. Err. [95% Conf. Interval]<br />
region: Independent<br />
var(hwy) .0000209 .0001103 6.71e-10 .650695<br />
var(unemp) .0000238 .0000135 7.84e-06 .0000722<br />
var(_cons) .0030349 .0086684 .0000112 .8191296<br />
state: Identity<br />
var(_cons) .0063658 .0015611 .0039365 .0102943<br />
var(Residual) .0012469 .0000643 .001127 .0013795<br />
LR test vs. linear regression: chi2(4) = 1189.08 Prob > chi2 = 0.0000<br />
Note: LR test is conservative and provided only for reference.<br />
. estimates store prodrc<br />
This model is the same as that fit in example 4 except that Z (3)<br />
jk<br />
is now the n jk × 3 matrix with<br />
columns determined by the values of hwy, unemp, and an intercept term (one), in that order, and<br />
(because we used the default Independent structure) Σ 3 is<br />
Σ 3 =<br />
(<br />
hwy unemp cons<br />
σa 2 )<br />
0 0<br />
0 σb 2 0<br />
0 0 σc<br />
2<br />
The random-effects specification at the state level remains unchanged; that is, Σ 2 is still treated as<br />
the scalar variance of the random intercepts at the state level.<br />
An LR test comparing this model with that from example 4 favors the inclusion of the two random<br />
coefficients, a fact we leave to the interested reader to verify.<br />
The estimated variance components, upon examination, reveal that the variances of the random<br />
coefficients on hwy and unemp could be treated as equal. That is,<br />
Σ 3 =<br />
(<br />
hwy unemp cons<br />
σa 2 )<br />
0 0<br />
0 σa 2 0<br />
0 0 σc<br />
2<br />
looks plausible. We can impose this equality constraint by treating Σ 3 as block diagonal: the first<br />
block is a 2 × 2 multiple of the identity matrix, that is, σ 2 aI 2 ; the second is a scalar, equivalently, a<br />
1 × 1 multiple of the identity.