# Is there an easier way to integrate projpred with stanfit object?

**URL:** <https://discourse.mc-stan.org/t/is-there-an-easier-way-to-integrate-projpred-with-stanfit-object/17065>\
**Category:** General\
**Tags:** projpred\
**Created:** [July 29, 2020, 3:29am UTC](https://discourse.mc-stan.org/t/is-there-an-easier-way-to-integrate-projpred-with-stanfit-object/17065 "2020-07-29T03:29:51Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mcol](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mcol/32/5598_2.png) [@mcol](https://discourse.mc-stan.org/u/mcol)\
**Post date:** [August 4, 2020, 2:10pm UTC](https://discourse.mc-stan.org/t/is-there-an-easier-way-to-integrate-projpred-with-stanfit-object/17065/6 "2020-08-04T14:10:36Z")

</div>

There are two examples in the projpred source code, that use `init_refmodel()` to define reference models for `rstanarm` and `brms` models (see for example [https://github.com/stan-dev/projpred/blob/181606a416471f8145976e8b048d5213b9fb6ab3/R/refmodel.R#L116](https://github.com/stan-dev/projpred/blob/181606a416471f8145976e8b048d5213b9fb6ab3/R/refmodel.R#L116)). By following those functions, you’ll see how to set up the various parameters expected by `init_refmodel()`.

Having said that, I agree that documentation could be improved on that front! :)

---

_[View the full topic](https://discourse.mc-stan.org/t/is-there-an-easier-way-to-integrate-projpred-with-stanfit-object/17065)._
