# Errors producing a prior predictive distribution using smoothers in stan\_gamm4 with rstanarm

**URL:** <https://discourse.mc-stan.org/t/errors-producing-a-prior-predictive-distribution-using-smoothers-in-stan-gamm4-with-rstanarm/16620>\
**Category:** rstanarm\
**Created:** [July 15, 2020, 11:15am UTC](https://discourse.mc-stan.org/t/errors-producing-a-prior-predictive-distribution-using-smoothers-in-stan-gamm4-with-rstanarm/16620 "2020-07-15T11:15:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ara\_Winter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ara_winter/32/4284_2.png) [@Ara\_Winter](https://discourse.mc-stan.org/u/Ara_Winter)\
**Post date:** [July 15, 2020, 1:02pm UTC](https://discourse.mc-stan.org/t/errors-producing-a-prior-predictive-distribution-using-smoothers-in-stan-gamm4-with-rstanarm/16620/2 "2020-07-15T13:02:38Z")

</div>

You can try changing the seed as in this thread here:

> [@Error in check\_stanfit(stanfit)](https://discourse.mc-stan.org/t/error-in-check-stanfit-stanfit/13588):
>
> Please also provide the following information in addition to your question: Operating System: Windows rstanarm Version: 2.19.3 Hi everyone; I ran a stal\_glm example for a poisson regression that I found here: [Estimating Generalized Linear Models for Count Data with rstanarm](http://mc-stan.org/rstanarm/articles/count.html) The code exact code I ran was this one: library(rstanarm) data(roaches) stan\_glm1 \<- stan\_glm(y ~ roach1, offset = log(exposure2), data = roaches, family = poisson, prior = normal…

I know a lot folks don’t run with seed values initially.

You might want to also set the init value to 0 or 1 I can’t remember with the poosson\_rng what the init should be at.

---

_[View the full topic](https://discourse.mc-stan.org/t/errors-producing-a-prior-predictive-distribution-using-smoothers-in-stan-gamm4-with-rstanarm/16620)._
