Hey y’all!

I just had a quick question and searching around the 'net has brought me close, but I am still not 100% and could use the sanity check… Specifically, hypothetically if I had assessments over time, nested in students, nested in schools, is this the gist of how I would specify an autoregressive structure in the residuals?

```
Y ~ 1 + Time + X1 + X2 + (1 | Student) + (1 | School) +
ar(time = Time, gr = Student:School, p = 1, cov = TRUE)
```

My concern at this point is that I am still not totally certain if, with this specification, brms is modeling the ar portion exclusively in the residuals as opposed to conditioning the outcome on the autoregressive process in addition to the covariates? My background is more in structural equation modeling, and so if it helps my goal is to–based on the following paper–estimate a model more consistent with the latent growth model with structured residuals (Figure 6) as a opposed to a (univariate) Autoregressive Latent Trajectory (ALT) Model (Figure 5):

My impression is that brms can def handle this, but I am new to using the program and although I have seen several examples and discussions, I have not been able to fully put my mind at ease that I am using the arguments correctly to get the AR process where I need it here.

Thanks so much for any help!!!