Thanks for the advice, I’ve been trying to implement the randomness as data as you say. Previous discussions indicate that rng functions are allowed in the transformed data block (Generating random numbers in the model), however according to the functions reference (21.1) they may only be used in the generated quantities block. Maybe this restriction is part of a more recent update?
Samslam
3
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Building importance sampler to refine approximate model | 21 | 2013 | September 13, 2017 | |
| Updating Posteriors in Light of More Data | 4 | 846 | August 30, 2023 | |
| Generating random numbers in the model | 20 | 5467 | July 23, 2021 | |
| Define densities with no direct analytical expression in STAN | 5 | 512 | May 31, 2019 | |
| Sampling from a matrix in STAN | 28 | 1622 | September 1, 2021 |