Setting up an AR(1) model

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
erikruzek
Posts: 16
Joined: Tue May 21, 2019 3:57 pm

Setting up an AR(1) model

Post by erikruzek »

Hi Chris, George, and all,

I hope everyone is doing well.

I have a question about setting up and running a growth curve model that has the additional wrinkle of allowing for an AR(1) structure to the residuals. I have looked at the MCMC manual, chapter 19, and seen the example with the rats dataset. That example is different because the data is in a wide format, with each measurement getting its own column. Is that how the data has to be setup to use the corresiduals() option? Or can it also be used when you have your data setup as long?

For reference, this is the model I am currently running (data is in long/stacked format with 4 unique values of yr):

Code: Select all

runmlwin (sel cons yr yr_sq, eq(1)) (math cons yr yr_sq, eq(2)), ///
	level2(id: (cons yr, eq(1)) (cons yr, eq(2)), residuals(uq, reflated)) /// 
	level1(obs: (cons, eq(1)) (cons, eq(2)), residuals(rq, reflated)) nopause corr
I used the reflated residuals at level 1 to investigate residual correlations and see larger than expected autoregressive correlations that I would like to account for.

Thanks!
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Setting up an AR(1) model

Post by ChrisCharlton »

I checked this with George and he confirmed that this option is only relevant for multivariate response models, i.e. when the data is in wide form and there is one response per occasion.
erikruzek
Posts: 16
Joined: Tue May 21, 2019 3:57 pm

Re: Setting up an AR(1) model

Post by erikruzek »

Got it, Chris. Is it possible to setup a similar model as the Rats example in Chapter 19 with two outcomes like I have here?
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Setting up an AR(1) model

Post by ChrisCharlton »

I checked this with George and here is his response:
No this won't work as the AR1 structure would be applied to the whole level-1 8*8 covariance matrix (2 outcomes * 4 occasions) and you would not in general expect, for example, the t,t-1 cross-equation correlations to equal the same equation correlations. So the AR1 structure only makes sense when you have a single outcome variable.
Post Reply