# Inclusion of Conditional Autoregressive priors to a zero and one inflated beta model in BRMS

**URL:** <https://discourse.mc-stan.org/t/inclusion-of-conditional-autoregressive-priors-to-a-zero-and-one-inflated-beta-model-in-brms/34223>\
**Category:** brms\
**Created:** [February 23, 2024, 7:53am UTC](https://discourse.mc-stan.org/t/inclusion-of-conditional-autoregressive-priors-to-a-zero-and-one-inflated-beta-model-in-brms/34223 "2024-02-23T07:53:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swapnil\_Bhowal](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/swapnil_bhowal/32/17938_2.png) [@Swapnil\_Bhowal](https://discourse.mc-stan.org/u/Swapnil_Bhowal)\
**Post date:** [February 23, 2024, 7:53am UTC](https://discourse.mc-stan.org/t/inclusion-of-conditional-autoregressive-priors-to-a-zero-and-one-inflated-beta-model-in-brms/34223/1 "2024-02-23T07:53:48Z")

</div>

Short summary of the problem

I am a total beginner in spatial modeling and brms. My data is the proportion of land cover per unit area data with a certain amount of zero and one values. So, I am trying to fit a zero-one inflated beta model in brms. I am also trying to account for the spatial autocorrelation using ICAR. But I am confused about which terms the CAR should be added to, i.e., mu, phi, zoi, coi?

- Operating System: Windows 10
- brms Version: 2.20.4

---

<div class="post-metadata">

**Author:** ![jsocolar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jsocolar/32/2486_2.png) [@jsocolar](https://discourse.mc-stan.org/u/jsocolar)\
**Post date:** [February 23, 2024, 12:42pm UTC](https://discourse.mc-stan.org/t/inclusion-of-conditional-autoregressive-priors-to-a-zero-and-one-inflated-beta-model-in-brms/34223/2 "2024-02-23T12:42:28Z")

</div>

Adding to `mu` will model spatial autocorrelation in the expectation of the continuous responses, but not in the probabilities of zero or one. Adding to `zoi` will model spatial autocorrelation in whether an observation comes from the continuous process or one of the inflation states. Adding to `coi` will model spatial autocorrelation in whether an observation is a zero or a one, conditional on that observation being in one of the inflation states. Adding to `phi` will model correlated spatial variation in the scale parameter of the continuous part of the response.

If you wanted to model, for example, spatial autocorrelation in the probability of being a zero, as distinct from both the continuous and the one-inflated components, and NOT spatial autocorrelation in the probability of being a one as distinct from the continuous component, you would need to reparamterize the zero-one inflated beta using a custom family. If you’re sure that’s what you need, we can help you with that, but let’s not cross that bridge unless you’re sure.
