bayesplot icon indicating copy to clipboard operation
bayesplot copied to clipboard

SBC histogram

Open dpsimpson opened this issue 7 years ago • 6 comments

There is a code for making the histogram for the SBC paper in the sbc_histogram branch.

dpsimpson avatar Apr 25 '18 20:04 dpsimpson

@avehtari Can this be closed given https://github.com/stan-dev/bayesplot/issues/178 and https://github.com/stan-dev/bayesplot/pull/179? Aren't the SBC plots a subset of the new diagnostic plots?

jgabry avatar May 09 '19 19:05 jgabry

That issue and that pull request so far discuss functions which would take chains as an argument, and ranks are computed by combining the chains. In SBC the prior draw and posterior draws in one iteration are forming one rank, and sbc_histogram would probably take these ranks as argument (and the extra thing in the plotting is adding the interval butterfly behind).

Both mcmc_rank_histogram and sbc_histogram could use the same code for the plotting part, but it's not clear whether mcmc_rank_histogram should have that interval butterfly, ecdf difference with envelope is better for intervals. There would be more code to share in ecdf difference with envelope plot, but again the input arguments are different.

avehtari avatar May 09 '19 20:05 avehtari

Ok, that makes sense, thanks.

jgabry avatar May 09 '19 20:05 jgabry

If you don't mind, I can try merging your code from the SBC paper with my attempt?

jpritikin avatar May 16 '19 21:05 jpritikin

If the code on Dan's branch that he refers to above is useful go for it. Not sure if that's what you mean. If there's other code in with the paper that's useful I'm sure that's fine too.

jgabry avatar May 16 '19 21:05 jgabry

You can definitely take whatever we already have in the code for the simple sbc plot in rstan and put it into this new bayesplot function with your additions. Up to you what you want to take and what you want to rewrite.

jgabry avatar May 16 '19 22:05 jgabry