Pystan Posterior Uncertainty intervals


#1

I saw on another forum that pystan doesn’t have the same function as Rstan where they use posterior_interval, but we can use np.percentile() instead. I’m currently using the fit.optimizing() function in pystan to get the set of parameters that maximize the posterior. I now would also like to obtain an outer 95% confidence interval for the posterior result so I am wondering whether the np.percentile function would be used with the optimizing function? I tried finding the 95% interval of the parameter distribution, but that did not give a good confidence interval around the result, so I think the 95% interval would have to be taken from the posterior. Would I use the percentile function with the optimizing function to obtain a 95% confident posterior result? Thanks!