Deploy Model with Shiny but Avoid Installing Stan?

I have a model build using rstanarm, and I would like to deploy a Shiny app using posterior_predict function. My question: is it possible to generate posterior predictions using a saved model without having to install Stan on the deployment server? I tried to inspect the code for posterior_predict, but I didn’t have much luck figuring out what’s going on under the hood (I’m new if you couldn’t already tell, ha!).

I am stuck with a CentOS 7 install with older libraries, and I don’t have much ability to change it. If using posterior predict is not possible, any other suggestions? My goal is to allow users to play with slider bars of model inputs and see how that impacts the predicted distribution.

  • Operating System: CentOS 7
  • rstanarm Version: 2.21.1

Maybe use tidybayes::add_predicted_draws() in deployment instead?

Thank you for the suggestion, Mike. It looks like that function is still requiring rstanarm. I’ll keep poking around for a viable alternative.

I’m also working on getting stan installed on the remote server. Not sure which is the easier task.