8 schools example gives divergent transitions???

72 views
Skip to first unread message

Sebastian Weber

unread,
Jul 13, 2016, 5:02:27 PM7/13/16
to stan development mailing list
Hi!

I just realized that calling in rstan 2.10

stan_demo("eight_schools")

fires a "50 divergent transitions after warmup" message at me. As far as I recall this did not happen with 2.9.

It would be great if we can set the defaults such that this classic model runs fine out of the box, no? This is very likely one of the first examples users will execute (its on the RStan Getting Started Wiki); as such this is not the best start for beginners...

Best,
Sebastian

Michael Betancourt

unread,
Jul 13, 2016, 5:35:02 PM7/13/16
to stan...@googlegroups.com
The centered 8-schools model is biased, hence all of the
divergences. In fact it was that model that motivated our
current understanding of divergences and biases in the
first place!

No sampler parameter changes will fix this — you have
to run the non centered model. But I like the warnings
— it gives users an immediate taste of how Stan will
yell at you if it sees problems.
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Bob Carpenter

unread,
Jul 13, 2016, 11:18:40 PM7/13/16
to stan...@googlegroups.com
Thanks for pointing that out, Sebastian. I agree that
eight schools should work out of the box.

While diagnosing problems is great, I'm afraid potential
users (judging from stories I heard from people at the
ecology conference) are simply concluding that Stan's too hard
and/or broken for models they want. They don't get that
feeling from JAGS/BUGS, because they don't gripe at users.
So I think we have to somehow work on assuaging user fears long
enough to educate them on why diagnostics are so useful.

We should just change the coding for the eight schools model
here. I'm OK with providing broken models to users as long
as we also provide fixed ones to go with.

I really don't like eight schools as an intro example
because I found the measurement error aspect of it competely
inscrutable as a beginner. We also know it's very sensitive
to priors and parameterization.

- Bob

Sebastian Weber

unread,
Jul 14, 2016, 2:36:24 AM7/14/16
to stan development mailing list
Hi!

Ah, ok. I checked the rstan wiki "Getting Started" page again and there we indeed put up the non-centered parametrization which should be ok. The one you get with the stan_demo "eight_schools" program is this one:

https://github.com/stan-dev/example-models/blob/master/misc/eight_schools/eight_schools.stan

and this one is not centered. How about we add a print statement into that model (transformed data block) which tells users what is going to happen and how to solve it?

I know that Stan is doing a great job when it comes to complaining about issues, but first time users are scared from this and will very likely lean towards some BUGS variant, just because it feels more safe.

Best,
Sebastian

Bob Carpenter

unread,
Jul 14, 2016, 10:56:19 AM7/14/16
to stan...@googlegroups.com

> On Jul 14, 2016, at 2:36 AM, Sebastian Weber <sdw....@gmail.com> wrote:
>
> ...

> I know that Stan is doing a great job when it comes to complaining about issues, but first time users are scared from this and will very likely lean towards some BUGS variant, just because it feels more safe.

Yes, that's indeed what's happening from what people
are telling me. They see those warnings and think Stan's
broken.

- Bob

Bob Carpenter

unread,
Jul 14, 2016, 10:59:28 AM7/14/16
to stan...@googlegroups.com
I created an issue:

https://github.com/stan-dev/example-models/issues/71

- Bob

> On Jul 14, 2016, at 2:36 AM, Sebastian Weber <sdw....@gmail.com> wrote:
>
Reply all
Reply to author
Forward
0 new messages