Visualizing rstan fit with R Shiny

I am wondering whether there is any convenient way to visualize the posterior distribution and related quantities using Rshiny after I get my rstan fitted result saved as Rdata?

Thx!

Have you tried shinystan? From the brief description you provided, I think it’s likely to give you what you asked for (and more).

1 Like

Hi,

Thanks so much for your advice!

After I loaded the package and ran the corresponding code, a local page on my browser poped up but I didn’t know how to save it. For example, if I would like to use Rmarkdown and knit my analysis as a pdf file, is there any way to include the Shiny app in the pdf or provide a link that others could visit through their browser and computer?

@stan_beginer There’s a big update to shinystan coming that will provide this feature (generating R markdown document from shinystan).

@ducoveen is report generation currently functional on the GitHub branch for version 3? If it is, then @stan_beginer you can try it out with

devtools::install_github("stan-dev/shinystan", ref = "v3-alpha")

That would be very helpful!

@stan_beginer @jonah,

The v3-alpha version should have report generation working now. There is a new function that will allow you to use it directly. The function is called generate_report(), instructions and examples can be found by using ?generate_report and depending on your need you can get a report that helps you out diagnostically or that visualized your estimates.

If you have any questions just let me know and I will try to help you out how to work with it.

Kind regards, Duco

1 Like