`ppc_error_scatter_avg()` should be able to plot residuals as function of predicted y, not y
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 442
- Forks
- 93
- Avg merge
- 3h 11m
- Merged PRs (30d)
- 1
Description
(Notation below: $y$ is data value, $y_{pred}$ is predicted value, with $y_{pred}$ computed as $stat(y_{rep})$ from posterior draws.)
The usual residual analysis plots $y - y_{pred}$ on the vertical axis with $y_{pred}$ on the horizontal axis.
But ppc_error_scatter_avg() plots $y - y_{pred}$ on the vertical axis with $y$ on the horizontal axis. This is confusing and difficult to interpret (for me, but I'm not alone: https://stats.stackexchange.com/a/146002).
I would be great if ppc_error_scatter_avg() plotted $y_{pred}$ on the horizontal axis, either by default or with that as an option. (Or maybe there's already an easy way to do that; sorry if I missed it.)
Thanks for considering!
P.S. My comment here assumes that $y_{pred}$ is computed as $stat(y_{rep})$ from posterior draws. But the related thread regarding residuals https://github.com/stan-dev/bayesplot/pull/349 seems to suggest that residuals are computed as $stat(y - y_{rep})$, with $stat(y_{rep})$ not separately, explicitly computed. Hmmm...?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ppc_error_scatter_avg() entry point and review the related residuals discussion in pull request #349. Determine whether the horizontal axis should use y_pred directly or whether the residual definition also needs clarification. Done means the plot supports the requested predicted-y presentation with documented, interpretable behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100