# Multiple autocorrelations

Is there a way to have multiple autocorrelations in a brms model.

I’m looking to add both cor_car and cor_arma (or cor_ar) to my model

Thanks!

• Operating System: 64bit Windows10
• brms Version:2.10.0

Not right now but this will be possible in the future once autocorrelations can be specified within formulas.

Hi Paul, this is a following up question.
Is brms package able to fit AR(1) \otimes AR(1) in the model?
I use

autocor = cor_ar(formula = ~ x | y,p = 1, cov = FALSE)

in the model that it is AR(1) along x which is nested in y. However, y is not AR(1).

Not yet, but as soon as we have something like AR(1) models for random effects (not sure when this will come) it should be possible.

Hi Paul, thanks for the prompt reply.
I hope the day will come soon.

BTW, there is a package named INLA using the following syntax for AR(1)\otimes AR(1) model

f(x,model=“ar”,group=y,control.group=list(model=“ar”)).

If the AR(1) could work for random effects in brms, it may use a similarly syntax like

autocor = cor_ar(formula = ~ x | y,p = 1, control=cor_ar(p=1))

Or even a simpler way that

autocor = cor_ar(formula = ~ x ):cor_ar(formula = ~ y)

Anyway, thank you for your time and help.

Thanks. Please note that with recent brms versions, AR terms are now directly specific within the formula, e.g. x ~ ar(p = 1)

Got it. Thank you. I will start using the new syntax.