# Missing data with brms mi()

**URL:** <https://discourse.mc-stan.org/t/missing-data-with-brms-mi/15685>\
**Category:** brms\
**Tags:** missing-data\
**Created:** [June 5, 2020, 5:22am UTC](https://discourse.mc-stan.org/t/missing-data-with-brms-mi/15685 "2020-06-05T05:22:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Garnier-Villarre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mauricio_garnier-villarre/32/5702_2.png) [@Mauricio\_Garnier-Villarre](https://discourse.mc-stan.org/u/Mauricio_Garnier-Villarre)\
**Post date:** [June 5, 2020, 5:22am UTC](https://discourse.mc-stan.org/t/missing-data-with-brms-mi/15685/1 "2020-06-05T05:22:53Z")

</div>

Hi

I am working in some missing data examples with brms using the model imputation with mi()

The model works fine, but I am wondering in the multivariate formula method, the formulas are technically independent. So, with multiple variables that have missing data as predictors, I would like to include as many of the model variables in missing data argument to help it.

In imputation methods this usually means that the same variables are both outcomes and predictors of missing data across variables, in methods like the one use by mice.

So, if I do the same in brms, would this be an appropriate model as the equations are independent, or am I creating some misspecified feedback loop?

With something like the following example, where for example mi(rumination) predicts depression | mi(), and also mi(depression) predicts rumination | mi()

* * *

```r
bf_dep <- bf(depression | mi() ~ mi(rumination) + mi(effortControl) + mi(anxiety) + sex + age)
bf_rum <- bf(rumination | mi() ~ mi(depression) + mi(effortControl) + mi(anxiety) +sex + age )

fit_imp2 <- brm(mvbf(bf_dep, bf_rum, rescor = F), 
                data = dat_mis,
                chains = 3,
                iter = 3000,
                family = "gaussian")

```

Thank you

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [June 5, 2020, 9:22am UTC](https://discourse.mc-stan.org/t/missing-data-with-brms-mi/15685/2 "2020-06-05T09:22:49Z")

</div>

This is the correct way of specifying it.

---

<div class="post-metadata">

**Author:** ![Mauricio\_Garnier-Villarre](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mauricio_garnier-villarre/32/5702_2.png) [@Mauricio\_Garnier-Villarre](https://discourse.mc-stan.org/u/Mauricio_Garnier-Villarre)\
**Post date:** [June 5, 2020, 1:42pm UTC](https://discourse.mc-stan.org/t/missing-data-with-brms-mi/15685/3 "2020-06-05T13:42:46Z")

</div>

great, thank you for the quick response
