Cor_arma for negative binomial model in brms

Dear community,
Could you advise if cor_arma is now available for a negative binomial or Poisson model? I try this function for my model and it produces strange results:

fit1=brm(count ~ scale(sqrt(ba.p))*scale(log(bai_cm2_year.p))+ scale(log(ccf.p))*scale(log(height_m.p))+species.p+(1|location_id/id.m), data=dat2, family=negbinomial(“log”), autocor = cor_arma(~1|year:id.m, 1, 1, cov = TRUE), prior=bprior1, cores = 4, iter = 1000 + 7000, warmup = 1000, chains = 3, seed=123),

where year is a factor.

The model converges without problem but posterior means for species are completely off the observed data. In turn, without cor_arma, the model shows good fit but up to 5 lags high autocorrelation for some variables. You mentioned previously, cor_arma was developed only for Gaussian family -, is it now available also for a negative binomial model?

  • Operating System: Windows10
  • brms Version: 2.13.3

Thank you in advance for your hints!

sorry your question fell through. It is quite possible this is a bug (either cor_arma should not be allowed or it should be allowed, but has issues). It would help us resolve this faster if you could either:

  • Test a simple model with just intercept and cor_arma on some simulated data and see if that has problems as well (that would be preferrable) or
  • Share the full code and data so that we can run your model…

It would be also great if you could be more precise (preferably provide code) in how you calculate “posterior means for species”, and whether “autocorrelation” here refers to autocorrelation within the posterior samples for a paramater in the model or autcorrelation of predictions across the levels of year.