ARR() defunct in brms: Autoregressive structure for dependant variable?


The ARR() correlation structure is no longer supported in BRMS (‘defunct’). This allowed for the dependant variable to be lagged and made a predictor on the right hand side, y \sim y_{t-1} + y_{t-2} + ... for an ARR(2) process.

What alternative exists to apply this in BRMS now? I can’t see anything on the help pages.



You can specify such a contrast manually as one or more predictor terms which just represent lagged y values.

1 Like

Is this not the same as the ar() function in the current version of brms (2.14.4; e.g., see here)?

I’ve come across the need to run autoregression on the response variable which I understand is no longer supported - ar() and arma() are autoregressions on the residuals correct? When you say that the lagged y values can be specified manually, I’m assuming you mean computing lags in the training data and specifying those lagged variables in the formula?

One drawback to this is that we can’t run posterior_predict() for data containing time points in the future as the lagged variables will be NA in the dataframe. This is handled elegantly by brms in .predictor_arma() when an ar() or arma() term is specified. I’m hoping I’m missing something and that there’s a straightfoward solution. Any help would be appreciated, thanks!

Yes you are right with what you are saying. You are also right that manual y_lag features will not be working elegantly with posterior_predict and friends at the moment. :-(

Ok, thanks for the quick response!