Page 1 of 1

Setting up an AR(1) model

Posted: Mon Mar 30, 2020 7:24 pm
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!

Re: Setting up an AR(1) model

Posted: Thu Apr 02, 2020 5:29 pm
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.

Re: Setting up an AR(1) model

Posted: Fri Apr 03, 2020 12:33 am
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?

Re: Setting up an AR(1) model

Posted: Fri Apr 03, 2020 4:48 pm
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.