Hi,
Are there any guidelines (articles, code or examples) as to how to conduct simulation studies using RStan? Is simulating the data in R then passing it to Stan the best way to do this?
Thanks,
Raphael
Hi,
Are there any guidelines (articles, code or examples) as to how to conduct simulation studies using RStan? Is simulating the data in R then passing it to Stan the best way to do this?
Thanks,
Raphael
There is not universal convention for how best to simulate data, but I prefer to simulate within Stan itself to keep everything as consistent (and transferable to other environments) as possible. Even then there are two ways to simulated with Stan – simulating in the transformed data
block and simulating in the generated quantities
block. The case study https://betanalpha.github.io/assets/case_studies/principled_bayesian_workflow.html has many examples using the generated quantities
approach.
Thanks Michael!