metrumresearchgroup / Torsten

library of C++ functions that support applications of Stan in Pharmacometrics
BSD 3-Clause "New" or "Revised" License
52 stars 11 forks source link

posterior predictive distributions code #33

Closed ghost closed 3 years ago

ghost commented 3 years ago

I have fit a number of Torsten population models with different residual variability options and the diagnostics look ok. However I did not find any code that I can use to extract posterior distributions and plot individual and population prediction to further evaluate the fit and guide model selection.

I am new Stan user and would appreciate any help.

Best regards

yizhang-yiz commented 3 years ago

User guide sec. 4.9 shows a population PKPD model and you can find some postprocessing script here. In the script we use posterior package for operating on draws and bayesplot package for plotting.

There are many paths for model selection. One option that many Stan users choose is loo package. Depends on the outcome of the comparison, there's also an option of model averaging & stacking. These packages and methods are not currently incorporated in Torsten. Hopefully we'll be able to address that soon.

ghost commented 3 years ago

I am very grateful for your prompt very helpful reply.

Regards