Spatial simultaneous autoregressive (SAR) structures for binomial regression using BRMS

Hi STAN groups,

I would like to know whether binomial regression coupled with SAR random effects can be fitted using brms?
I try this using the following code, but it reports an error “Error: SAR terms are not implemented for this family.”

brm(Res| trials(Res_Sum) ~ X1 + X2 + X3  
    +  X4 , 
    autocor = cor_errorsar(W7II),
    data = Data6, 
    family = binomial(),
    chains = 8,
    iter = 5000,
    warmup = 500,
    cores = 8,

Looking forward to hearing from you.
I use win 10 with R 4.0.5 and brms 2.15.9.


Unfortunately, - as the documentation says this feature is not available - part of the reason IMHO is that it if I understand those models correctly, they allow for marginalizing out a lot of the parameters for normal and student_t response. If you know of a suitable reference for how this model could be implemented with a binomial response, you may consider filing an issue at the brms repo, or (even better) you may try to implement the binomial SAR as a custom family (taking the implementation of normal_errorsar_lpdf you can see via make_stancode as a starting point).

Best of luck with your model.