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

Prior predictive checks with interpret #819

Open
GStechschulte opened this issue Jun 18, 2024 · 2 comments
Open

Prior predictive checks with interpret #819

GStechschulte opened this issue Jun 18, 2024 · 2 comments
Labels
Discussion Issue open for discussion, still not ready for a PR on it. feature request

Comments

@GStechschulte
Copy link
Collaborator

GStechschulte commented Jun 18, 2024

See Vincent's Prior Predictive Checks (ppc) with marginaleffects and brms blog post.

The idea is to simulate from the model, without using the data, in order to refine the model before fitting. One major challenge lies in interpretation: When the parameters of a model are hard to interpret, the user will often need to transform before they can assess if the generated quantities make sense, and if the priors are an appropriate representation of available information.

With the interpret sub-package, we might be able to plot and summarize prior predictive checks similar to how {marginaleffects} does this. With interpret should we be able to pass a Bambi model and an inference data object that only contains the priors (or prior predictive) for simulation?

Bambi already has the prior_predictive method. I can imagine this functionality would reduce the amount of cumbersome and boiler plate code needed to produce ppc plots and summaries resulting from matplotlib/seaborn and the transformation of parameter values. At work, I am finding myself performing ppc for hierarchical models and find it useful to not only perform the check at the population level, but also for group specific effects, etc.

Just a thought :)

@GStechschulte GStechschulte added Discussion Issue open for discussion, still not ready for a PR on it. feature request labels Jun 18, 2024
@aloctavodia
Copy link
Collaborator

Prior predictive checks are really useful. And we should make them easier for the users to generate and explore. In PreliZ we have a function (very new and still undertested) to iteratively explore how the prior affects the prior predictive distribution https://preliz.readthedocs.io/en/latest/examples/observed_space_examples.html
It works for models defined in Bambi and also PyMC, and PreliZ

@GStechschulte
Copy link
Collaborator Author

@aloctavodia this is great! Thanks for the link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Issue open for discussion, still not ready for a PR on it. feature request
Projects
None yet
Development

No branches or pull requests

2 participants