# Combine s() or gp() functions with mi() in model

**URL:** <https://discourse.mc-stan.org/t/combine-s-or-gp-functions-with-mi-in-model/27326>\
**Category:** brms\
**Created:** [May 2, 2022, 1:22pm UTC](https://discourse.mc-stan.org/t/combine-s-or-gp-functions-with-mi-in-model/27326 "2022-05-02T13:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frithureiks](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/frithureiks/32/11879_2.png) [@frithureiks](https://discourse.mc-stan.org/u/frithureiks)\
**Post date:** [May 2, 2022, 1:22pm UTC](https://discourse.mc-stan.org/t/combine-s-or-gp-functions-with-mi-in-model/27326/1 "2022-05-02T13:22:04Z")

</div>

Hello,  
Is there a way to combine the nonlinear functions s() or gp() with missing values in a brms model? The combinations `s(mi(predictor))` or `gp(mi(predictor))` do not work. Is there a workaround to make combining nonlinear functions and missing values possible?  
Thanks!

---

<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:** [May 17, 2022, 1:29am UTC](https://discourse.mc-stan.org/t/combine-s-or-gp-functions-with-mi-in-model/27326/2 "2022-05-17T01:29:35Z")

</div>

@Solomon @paul.buerkner

---

<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:** [May 17, 2022, 7:26am UTC](https://discourse.mc-stan.org/t/combine-s-or-gp-functions-with-mi-in-model/27326/3 "2022-05-17T07:26:46Z")

</div>

Unfortunately, this is not yet possible and it might be a long way until something like this will work.
