# Myglmer2stan function not found

**URL:** <https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047>\
**Category:** Interfaces\
**Created:** [June 25, 2017, 4:40pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047 "2017-06-25T16:40:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicole\_ford](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nicole_ford/32/408_2.png) [@nicole\_ford](https://discourse.mc-stan.org/u/nicole_ford)\
**Post date:** [June 25, 2017, 4:40pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/1 "2017-06-25T16:40:20Z")

</div>

Hello.

I just updated to most recent version of stan using instructions here:

> **[stan-dev/rstan](https://github.com/stan-dev/rstan/wiki)**
>
> RStan, the R interface to Stan. Contribute to stan-dev/rstan development by creating an account on GitHub.

I’m running r ‘your stupid darkness’ on a MacBook Pro OSX 10.12.5

I’ve used this code before this update. However now it says 'Error in myglmer2stan(mod:  
Could not find function “myglmer2stan”

Though I have it installed.

Thoughts?

---

<div class="post-metadata">

**Author:** ![nicole\_ford](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nicole_ford/32/408_2.png) [@nicole\_ford](https://discourse.mc-stan.org/u/nicole_ford)\
**Post date:** [June 25, 2017, 5:48pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/2 "2017-06-25T17:48:27Z")

</div>

Solved thanks

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [June 25, 2017, 5:51pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/3 "2017-06-25T17:51:00Z")

</div>

The `myglmer2stan` function does not come with RStan. Richard McElreath had a prototype `glmer2stan` function before he wrote his rethinking package, and people tried variations on the `glmer2stan` idea. So, the function you are referring to is probably in another package that you have installed locally, but it is typically better to use the `stan_glmer` function in the **rstanarm** package or the `brm` function in the **brms** package to execute those sorts of models.

---

<div class="post-metadata">

**Author:** ![nicole\_ford](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nicole_ford/32/408_2.png) [@nicole\_ford](https://discourse.mc-stan.org/u/nicole_ford)\
**Post date:** [June 26, 2017, 4:08am UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/4 "2017-06-26T04:08:09Z")

</div>

Thanks…!

But now I have another issue… new thread…

---

<div class="post-metadata">

**Author:** ![Kamlesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@Kamlesh\_Kumar](https://discourse.mc-stan.org/u/Kamlesh_Kumar)\
**Post date:** [June 27, 2018, 1:58pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/5 "2018-06-27T13:58:29Z")

</div>

Hi Nicole,

I am also stuck with this myglmer2stan function. Can you please share the function so that I can use it. Thanks alot in advance.

I really need it.

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [June 27, 2018, 2:24pm UTC](https://discourse.mc-stan.org/t/myglmer2stan-function-not-found/1047/6 "2018-06-27T14:24:13Z")

</div>

I think it is unmaintained for several years. Use `rstanarm::stan_glmer` or `brms::brm` or `rethinking::map2stan`.
