Prior predictive checks for rstanarm models?

Hi, Is it possible to (easily) visualize prior predictive checks when restricting myself to (the comfy confines of) the rstanarm and bayesplot toolboxes? I see questions and answers for brms users, but can I do the same or similar with/for rstanarm models and tools?

Sharing in case this helps someone going down a similar path.

[1709.01449] Visualization in Bayesian workflow (arxiv.org)) is linked from many places in the documentation for rstanarm, loo, and bayesplot packages and includes many examples of use of various (pre-built) tools to learn about and understand data (both simulated and empirical), prior predictive checks, parameter estimates, diagnostic tools, etc through visualization.

The rstanarm package (is great because it) allows the user to leverage look-alike and easy-to-use modelling tools from non-Bayesian workflows such as base R’s lm(), and lmer() from the lme4 package et al. I have not found an easy way to simulate data from the prior choices/specification though.

As I have been transitioning into Bayesian workflows, I have been wanting to (be like the cool Bayesian kids who) use more principled workflows – including prior predictive checks – and was looking for a similar tool/function/methodology to leverage the (admittedly often trivial) investment in the model and prior specification as one does with rstanarm and friends to visualize prior predictive checks.

I have been (slowly) working my way through Regression and Other Stories (avehtari.github.io) (which is excellent) and growing accustomed to generating and leveraging fake_data (which requires one to state beliefs in the form of a data-generating equation, etc.). I am currently rolling-my-own prior predictive checks, but remain hopeful better tools are available than whatever I come up with. :)

Taking my lumps! I now believe the answer to my original post is: One must set an argument in the call to stan_glm() (or other rstanarm functions) to specify to draw from the prior predictive distribution only, namely: prior_PD = TRUE.

I was looking for an argument in pp_check(). Oops.

1 Like