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

Phase out functions that reside in posterior #295

Open
sims1253 opened this issue Nov 29, 2022 · 2 comments
Open

Phase out functions that reside in posterior #295

sims1253 opened this issue Nov 29, 2022 · 2 comments

Comments

@sims1253
Copy link

bayesplot is still offering metrics like rhat that now reside in the posterior package. Not do both packages implement them, the implementations differ (afaik posterior is the up-to-date one while bayesplot is lacking behind).
Bayesplot should either just wrap posterior or completely remove those functions to have a single space for them I think.

@jgabry
Copy link
Member

jgabry commented Dec 2, 2022

Thanks for opening the issue. The situation is a bit confusing because the functions unfortunately have the same name but do different things. bayesplot's rhat function isn't computing rhat itself, it's just provided for convenience to extract the rhat values. That means that for a model fit using CmdStanR the rhat values should be the same as the ones computed by posterior. For RStan models we get the old version of Rhat because RStan is lagging behind and hasn't updated to using posterior yet.

Maybe the rhat() function in bayesplot should be deprecated in favor of a function named extract_rhat()? That would avoid confusion about what's going on under the hood. What do you think?

@sims1253
Copy link
Author

sims1253 commented Dec 2, 2022

I agree, that renaming the functions could help with clarity. It would also prevent masking when loading posterior and bayesplot together.

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

No branches or pull requests

2 participants