29.07.2014 Views

mixed - Stata

mixed - Stata

mixed - Stata

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>mixed</strong> — Multilevel <strong>mixed</strong>-effects linear regression 33<br />

The unstructured covariance matrix is the most general and contains many parameters. In this example,<br />

we estimate a distinct residual variance for each day and a distinct covariance for each pair of days.<br />

That there is positive covariance between all pairs of measurements is evident, but what is not as<br />

evident is whether the covariances may be more parsimoniously represented. One option would be to<br />

explore whether the correlation diminishes as the time gap between strength measurements increases<br />

and whether it diminishes systematically. Given the irregularity of the time intervals, an exponential<br />

structure would be more appropriate than, say, an AR or MA structure.<br />

. estimates store unstructured<br />

. <strong>mixed</strong> strength i.program##i.day || id:, noconstant<br />

> residuals(exponential, t(day)) nolog nofetable<br />

Mixed-effects ML regression Number of obs = 173<br />

Group variable: id Number of groups = 37<br />

Obs per group: min = 3<br />

avg = 4.7<br />

max = 5<br />

Wald chi2(9) = 36.77<br />

Log likelihood = -307.83324 Prob > chi2 = 0.0000<br />

Random-effects Parameters Estimate Std. Err. [95% Conf. Interval]<br />

id:<br />

(empty)<br />

Residual: Exponential<br />

rho .9786462 .0051238 .9659207 .9866854<br />

var(e) 11.22349 2.338371 7.460765 16.88389<br />

LR test vs. linear regression: chi2(1) = 292.17 Prob > chi2 = 0.0000<br />

Note: The reported degrees of freedom assumes the null hypothesis is not on<br />

the boundary of the parameter space. If this is not true, then the<br />

reported test is conservative.<br />

In the above example, we suppressed displaying the main regression parameters because they<br />

did not differ much from those of the previous model. While the unstructured model estimated 15<br />

variance–covariance parameters, the exponential model claims to get the job done with just 2, a fact<br />

that is not disputed by an LR test comparing the two nested models (at least not at the 0.01 level).<br />

. lrtest unstructured .<br />

Likelihood-ratio test LR chi2(13) = 22.50<br />

(Assumption: . nested in unstructured) Prob > chi2 = 0.0481<br />

Note: The reported degrees of freedom assumes the null hypothesis is not on<br />

the boundary of the parameter space. If this is not true, then the<br />

reported test is conservative.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!