# Comparing multiple models performance to spatially correlated models

**URL:** https://discourse.mc-stan.org/t/comparing-multiple-models-performance-to-spatially-correlated-models/32004
**Category:** brms
**Tags:** techniques, specification, fitting-issues
**Created:** [July 7, 2023, 2:59pm UTC](https://discourse.mc-stan.org/t/comparing-multiple-models-performance-to-spatially-correlated-models/32004 "2023-07-07T14:59:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alegiac95](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/alegiac95/32/16602_2.png) [@alegiac95](https://discourse.mc-stan.org/u/alegiac95)
#### Post date: [July 7, 2023, 2:59pm UTC](https://discourse.mc-stan.org/t/comparing-multiple-models-performance-to-spatially-correlated-models/32004/1 "2023-07-07T14:59:32Z")

</div>

Hi all,  
I’m trying to investigate if spatially correlated models are better in fitting the data compared to non correlated models.  
If I got the correlated model formula correct I would do something like

```plaintext
corr_model <- bf(mvbind(Y1,Y2,Y3,Y4)~ X1 + X2 + X3) + set_rescore(TRUE)

```

and then fit the model through the brms interface.  
Now, I need to compare these models to the models:

```plaintext
m1 <- bf(Y1~ X1 + X2 + X3)
m2 <- bf(Y2~ X1 + X2 + X3)
m3 <- bf(Y3~ X1 + X2 + X3)
m4 <- bf(Y4~ X1 + X2 + X3)

```

Is there a way to do for example bayes\_factor between the corr\_model and all the other models? or is there a better way that i could use to formulate the problem?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![dankehila](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/dankehila/32/16289_2.png) [@dankehila](https://discourse.mc-stan.org/u/dankehila)
#### Post date: [July 28, 2023, 12:52am UTC](https://discourse.mc-stan.org/t/comparing-multiple-models-performance-to-spatially-correlated-models/32004/2 "2023-07-28T00:52:44Z")

</div>

Have you considered [bridge sampling](https://paul-buerkner.github.io/brms/reference/bridge_sampler.brmsfit.html) or [LOO-CV](https://paul-buerkner.github.io/brms/reference/loo_compare.brmsfit.html)?

---

<div class="post-metadata">

### Author: ![cmcd](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/cmcd/32/8601_2.png) [@cmcd](https://discourse.mc-stan.org/u/cmcd)
#### Post date: [July 28, 2023, 5:20pm UTC](https://discourse.mc-stan.org/t/comparing-multiple-models-performance-to-spatially-correlated-models/32004/3 "2023-07-28T17:20:31Z")

</div>

If you have spatially _auto_correlated data ([Exploratory spatial data analysis • geostan](https://connordonegan.github.io/geostan/articles/measuring-sa.html)), you’ll also want to look at some other options if you haven’t already (such as CAR or SAR models). Otherwise, @dankehila’s comment is a good starting point for this discussion, in addition to examining the degree of correlation in the multivariate model, which might provide reason to use it.
