Skip to content

Posterior Predictive Plots with multivariate Outcomes #2447

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

Open
NathanielF opened this issue Apr 6, 2025 · 2 comments
Open

Posterior Predictive Plots with multivariate Outcomes #2447

NathanielF opened this issue Apr 6, 2025 · 2 comments

Comments

@NathanielF
Copy link

Posterior Predictive Checks and Plots

I've been working with multivariate outcome data lately in a SEM/CFA case and I found it's generally useful to be able to plot the posterior predictive checks distinguishing the different outcomes rather than a total amalgamated outcome

See here: https://www.pymc.io/projects/examples/en/latest/case_studies/CFA_SEM.html#posterior-predictive-checks

Would it be useful or feasible to add this kind of check to the plot_ppc functionality?

@OriolAbril
Copy link
Member

OriolAbril commented Apr 22, 2025

This should already be possible via the flatten keyword. I added an example to one of my blogposts: https://oriolabrilpla.cat/en/blog/posts/2023/plot_ppc.html#flatten. That being said, this should be easier and much more flexible with the refactored version https://arviz-plots.readthedocs.io/en/latest/api/generated/arviz_plots.plot_ppc_dist.html, and it is probably a good idea to add an example of this to the gallery which should also ensure both api and docs are better for doing this.

Note the grouby behaviour in plot_ppc for repeated coordinates is still wip in the refactored version though but it should not have any effect on the example you shared as coord values are never repeated

@NathanielF
Copy link
Author

Perfect @OriolAbril I didn't know this!

Also Cc @fonnesbeck FYI

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