Page 1 of 1
Repeated measures data: Can MLwiN allow AR1 residual errors?
Posted: Fri Oct 28, 2011 6:46 am
by Queena
For the repeated measures data, the within-individual (level 1) residuals are correlated.
The autocorrelation or other types of the correlation structure of the level 1 residual have been discussed by some authors.
From the runmlwin document (manual), the "restype" is restricted to MCMC estimation.
Is there any possible way to run such model without using MCMC estimation?

Re: Repeated measures data: Can MLwiN allow AR1 residual err
Posted: Fri Oct 28, 2011 1:41 pm
by GeorgeLeckie
Hi Queena,
The only way to fit AR1 residual errors to repeated measures data (measurement occasions at level 1, nested within individuals at level 2) is to formulate the model as a multivariate response model and to fit this model using MCMC. You cannot fit the equivilent model using IGLS (i.e. maximim likelihood). See Chapter 19 "Mixed Response Models and Correlated Residuals" of the MCMC manual. The do-file to replicate this chapter using runmlwin is at:
http://www.bristol.ac.uk/cmm/software/r ... /examples/
I have highlighted the model output from the example given in the manual below
Code: Select all
. runmlwin ///
> (y8 cons, eq(1)) ///
> (y15 cons, eq(2)) ///
> (y22 cons, eq(3)) ///
> (y29 cons, eq(4)) ///
> (y36 cons, eq(5)), ///
> level1(rat: ///
> (cons, eq(1)) ///
> (cons, eq(2)) ///
> (cons, eq(3)) ///
> (cons, eq(4)) ///
> (cons, eq(5)) ///
> ) ///
> mcmc(chain(50000) refresh(500) corresiduals(arindepvars)) ///
> initsb(b) initsv(V) corr ///
> nopause
MLwiN 2.24 multilevel model Number of obs = 30
Multivariate response model
Estimation algorithm: MCMC
Burnin = 500
Chain = 50000
Thinning = 1
Run time (seconds) = 47.9
Deviance (dbar) = 1015.67
Deviance (thetabar) = 1006.32
Effective no. of pars (pd) = 9.35
Bayesian DIC = 1025.03
------------------------------------------------------------------------------
| Mean Std. Dev. z ESS [95% Cred. Interval]
-------------+----------------------------------------------------------------
y8 |
cons_1 | 152.1868 2.50771 60.69 47940 147.2231 157.1141
-------------+----------------------------------------------------------------
y15 |
cons_2 | 201.7874 2.851714 70.76 47188 196.1168 207.4404
-------------+----------------------------------------------------------------
y22 |
cons_3 | 245.0578 3.414991 71.76 48589 238.3248 251.8354
-------------+----------------------------------------------------------------
y29 |
cons_4 | 289.5148 4.245057 68.20 48435 281.1146 297.9683
-------------+----------------------------------------------------------------
y36 |
cons_5 | 324.8218 4.306853 75.42 49030 316.3396 333.3538
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Mean Std. Dev. ESS [95% Cred. Int]
-----------------------------+------------------------------------------------
Level 1: rat |
var(cons_1) | 188.7329 62.31378 316 101.9742 344.2719
corr(cons_1,cons_2) | .9417586 .0181803 353 .9009867 .9711142
var(cons_2) | 243.7805 81.49138 266 130.3406 451.0101
corr(cons_1,cons_3) | .8872397 .0340243 350 .811777 .9430629
corr(cons_2,cons_3) | .9417586 .0181803 353 .9009867 .9711142
var(cons_3) | 347.1763 116.0362 258 186.6769 637.7278
corr(cons_1,cons_4) | .8361841 .047789 346 .7314003 .9158218
corr(cons_2,cons_4) | .8872397 .0340243 350 .811777 .9430629
corr(cons_3,cons_4) | .9417586 .0181803 353 .9009866 .9711143
var(cons_4) | 534.1096 176.6114 254 290.4864 977.8517
corr(cons_1,cons_5) | .788352 .0597024 343 .6589819 .8893676
corr(cons_2,cons_5) | .8361841 .047789 346 .7314003 .9158218
corr(cons_3,cons_5) | .8872397 .0340243 350 .811777 .9430629
corr(cons_4,cons_5) | .9417586 .0181803 353 .9009867 .9711143
var(cons_5) | 553.0598 181.8033 294 304.6109 1014.016
------------------------------------------------------------------------------
However, I believe you can fit AR1 errors now using Stata's xtmixed command.
Best wishes
George