Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New R-hat, ESS and quantile-MCSE functions + related plots + rank plots #621

Closed
avehtari opened this issue Mar 20, 2019 · 2 comments · Fixed by #724
Closed

New R-hat, ESS and quantile-MCSE functions + related plots + rank plots #621

avehtari opened this issue Mar 20, 2019 · 2 comments · Fixed by #724

Comments

@avehtari
Copy link
Contributor

Add new R-hat, ESS, quantile-MCSE and new plots described in

  • Aki Vehtari, Andrew Gelman, Daniel Simpson, Bob Carpenter, Paul-Christian Bürkner (2019): Rank-normalization, folding, and localization: An improved R-hat for assessing convergence of MCMC. arXiv preprint arXiv:1903.08008.

The reference code in R is available in monitornew.R and in monitorplot.R. I think porting required computation from monitornew.R is easy and porting the plots may require a bit more work, but I'm not expert on Python graphics.

There might be also something useful in the corresponding issues for rstan stan-dev/rstan#617 and bayesplot stan-dev/bayesplot#178

@ColCarroll
Copy link
Member

@avehtari thanks to you and collaborators for the nice paper, releasing code at the same time, and for reaching out to help get this all implemented!

Two questions on rank plots:

  1. Does it make sense to think about putting error bars on rank plots, like in the simulation based calibration paper? Part of me thinks that if you want to automatically "score" your rank plot you should just use R-hat.
  2. Any thoughts on how to set a y-axis for "mean centered" rank plots? I like that they show positives and negatives very clearly, but it is hard to tell scale. The error bars might help with this, I suppose.

Centered Eight Schools:
image

Non-centered Eight Schools:
image

@avehtari
Copy link
Contributor Author

Does it make sense to think about putting error bars on rank plots, like in the simulation based calibration paper?

Yes, but that they are not sufficient as mentioned in SBC paper. I think the benefit of rank plots is the simple interpretation. Additional figure type would be ECDF difference as in Fig 14c in SBC paper. It has a better envelope, but it requires more explanation and thus both are useful to have.

Part of me thinks that if you want to automatically "score" your rank plot you should just use R-hat.

Yes, we recommend Rhat, bulk-ESS, tail-ESS and HMC specific diagnostics for automatic diagnostics and rank plots for helping to see where the problem is or if you want to check just some rank plots.

Any thoughts on how to set a y-axis for "mean centered" rank plots?

I don't like it for this purpose as it's not that familiar for people as histograms and would require additional explanation without containing additional information. I would instead consider adding ECDF difference plot, which has the benefit of being more sensitive to changes in the edges and takes into account dependencies like clustering unlike histogram error bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants