Skip to content

ppc_error_scatter_avg() should be able to plot residuals as function of predicted y, not y #350

Open
@kruschke

Description

@kruschke

(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 #349 seems to suggest that residuals are computed as $stat(y - y_{rep})$, with $stat(y_{rep})$ not separately, explicitly computed. Hmmm...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions