I’m fitting a GAMM in brms (vers. 2.15.0).
My response variable is counts in permanent plots over time. The model is clearly overdispersed with a Poisson distribution, thus I’m using a negative binomial distribution.
The model fits fine, but due to the repeated measures in permanent plots, I have an issue with temporal autocorrelation. Therefore, I have included an AR(1) correlation structure in the model. However, apparently it is causing some fitting troubles. It seems like brms has troubles estimating the shape parameter in the negative binomal distribution when an AR (or ARMA) correlation structure is included in the model.
Any advises what to do?
brm(counts ~ s(time) + (1|plot) + ar(time = time, gr = plot, p = 1, cov = TRUE), data = mydata, family = negbinomial(link = "log"))