Bivariate model with autoregressive errors in brms

Hello everybody,

I’m wondering how to implement a bivariate model with an AR error model in which the error terms are correlated. To give an idea of what I mean, I’m attaching an image from Beyond the Cross-Lagged Panel Model: Next-generation statistical tools for analyzing interdependencies across the life course:

image

The key point is to implement a cross lagged model that includes random intercepts. The cross lagged terms are displayed as c1 and c2 in the figure above.

I tried something like

formula_model <- (
  bf(mvbind(value1, value2) | mi() ~ poly(week, 2) + (1|p|subject))
)

fit_nonlinear <- brm(
  formula_model, 
  autocor = ~ ar(p=1),
  data=results,
  chains=1,
  iter=2000)

but this only yields two independent AR processes.

  • Operating System: Windows
  • brms Version: 2.15.0
2 Likes

I think what you are looking for are sometimes called vector autoregressive (VAR) models, and there is currently no such autocorrelation structure in brms; as you said ar() just gives two independent ar terms. (Further it does not give each “subject” their own ar term, which might be something you’d want?) It also looks like there are latent variables in your model which currently have very limited support in brms, but this might change in brms 3.0.

One thing you can try is to manually create the lagged variables and use them as predictors (and/or outcomes). There’s been some related discussions here, and another recent related question here.

1 Like

Thank you Matti! I guess that’s a good answer (although it is negative one).

1 Like