AR1 model and Dirichlet Regression in brms

Dear all,

First of all, I am not sure if it is (mathematical) possible and useful to fit a Dirichlet Regression with an AR-1 term. However, my data might come from such a data generating procedure. I try to fit a Dirichlet regression with an AR-1 process:

d_bf = bf(
bind(y_d1, y_d2, y_d3) ~ 0,
muyd2 ~ x + (1|id) + (1|year),
muyd3 ~ x + cat + (1|id) + (1|year),
autocor = cor_ar(form = ~ year | id, 1, cov=T)
)

And that is how I call it:

brm(d_bf, AR_df,
family=dirichlet(),
prior = priors,
chains=4)

brms allows this kind of specification and it also adds an AR1 parameter to the summary output. But: I dont think that it takes the AR term into account in its “inner” estimation. The summary looks like the unchanged prior distribution:

      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS

ar[1] -0.01 0.59 -0.96 0.96 1.00 7684 2017

If I estimate the model without the AR term, then I get the exact estimates. The same “problem” occurs when fitting categorical regressions.

Thank you

Please also provide the following information in addition to your question:

  • Operating System: Win 10
  • brms Version: 2.10.3

Do you have a minimal reproducible example for me to try out? I have feeling that you may be right it is not taken into account. Likely the fix will be to not allow it for the time being until https://github.com/paul-buerkner/brms/issues/708 is implemented.

1 Like

Yes. However, I am not 100% sure, if my simulated dataset acutally follows the data generating process of an AR1 dirichlet hierarchical regression. If I use lagged response variables as an equivalent to the AR1 process, it shows that there is serial correlation.

test_diri.R (2.1 KB)

Indeed, the AR term was not used in the model at all. For the time being I have now added a check which results in an error until I have a clear theoretical idea how to include AR terms in dirichlet and similar models.