I ran my stan model perfectly and got the parameter estimation. But now I want to use them to do some analysis, like t.test, regression and so on, especially some of them are cross-model. I don’t know how to get the result in an analyzable form(like vector, list or matrix?) so I can do further work. What kind of fuction should I try?

By the way, I used ‘' to try to pick out parameter that I am interested in, but the error told me that it's not the type of data that I can apply'’ to. So can someone tell me how to realize it? Thanks in advance!

If you are using R, as I assume you do, you could start by looking at this vignette that teaches you how to interact with a stanfit object and extract parameters:

https://cran.r-project.org/web/packages/rstan/vignettes/stanfit-objects.html

You can also explore the posterior graphically using shinystan (http://mc-stan.org/shinystan/) and bayesplot (http://mc-stan.org/bayesplot/).

4 Likes

Thanks！ I found very useful instructions there!