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

Improve sbc plot #640

Closed
wants to merge 1 commit into from
Closed

Improve sbc plot #640

wants to merge 1 commit into from

Conversation

jpritikin
Copy link
Contributor

Summary:

  • Limit to the most non-uniform parameter distributions by default
  • Show confidence interval (as suggested in SBC paper)
  • Warn if bins do not hold an equal number of histogram entries.

How to Verify:

Run an SBC and plot it

Reviewer Suggestions:

How do you like it?

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Joshua N. Pritikin

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@jgabry
Copy link
Member

jgabry commented May 16, 2019

Thanks for working on this! If it's ok with you I think we would prefer for this to go into bayesplot and rstan can then call it (replacing the current sbc plot). That's the direction we want to move with plotting and there's already an open issue for this at stan-dev/bayesplot#146 (not that you should have known that). The basic sbc plot we have in rstan now was definitely just a placeholder until the bayesplot version gets implemented. If you're interested in contributing it to bayesplot that would be great, but if you don't have time I can take care of it.

In a bayesplot version of the plotting function (say, bayesplot::sbc_hist() maybe?) the input wouldn't be the output from rstan but stuff already extracted from the sbc object returned by rstan (ranks, etc) so it can be applicable outside of rstan too. Then we can define a method for sbc_hist() in rstan.

@jpritikin
Copy link
Contributor Author

Sure, it's a pretty trivial change to take x$ranks instead of x. I'd be happy to open a PR to bayesplot. I'd need more guidance if you want me to write the documentation. Maybe you can handle the docs?

@jpritikin jpritikin closed this May 16, 2019
@jgabry
Copy link
Member

jgabry commented May 16, 2019

Sounds good! Thanks

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 this pull request may close these issues.

2 participants