Autocorrelation

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
michaellawton
Posts: 11
Joined: Tue Nov 22, 2011 10:40 pm

Autocorrelation

Post by michaellawton »

Hello

Is there a simple way of testing for autocorrelation (e.g. lagged scatterplots, correlograms) after fitting a repeated measures model with runmlwin?

Many thanks
Michael
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Autocorrelation

Post by GeorgeLeckie »

Hi Michael,

You could pull back the residual errors from runmlwin using the level1(, residuals()) option. You could then xtset the data and make use of Stata's standard time-series and panel-series commands to do informal graphical diagnostics.

A more formal approach would be to first fit your current model which assumes the residual errors to be indepdent and to then fit the more complex model where you estimate the autocorrelation parameter. However, in general you cannot specify autocorrelated residual errors in MLwiN. The exception is when all respondents are measured at the same points in time as you can then put the data into "wide format" and fit a multivariate response model where you impose an AR1 structure on the residual error variance-covariance matrix. You can only fit this model by MCMC You can do model comparisosn using the DIC statistics.

See Chapter 19, Section 6 of the MLwiN MCMC Manual for full details.

The runmlwin syntax to replicate that chapter is at:

http://www.bristol.ac.uk/cmm/media/runm ... siduals.do

However, if all you want is to allow for AR1 residual errors in a standard growth curve model, then you can do this using the xtmixed command! Then simply do a LR test comparing this to the simpler model which assumes the residual errors to be independent.

Best wishes

George
Post Reply