This is possible in Stan though, unless I’m misunderstanding what you’re saying. This thread shows how to do it in CmdStan if that is preferable to Rstan: What is the best way to add a user function that is used in likelihood calculation? - #6 by philipm
bbbales2
20
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Making arbitrary C++ functions available to Stan | 14 | 2138 | June 12, 2018 | |
| Vignette for interfacing with external C++ code via rstan | 9 | 1640 | December 8, 2016 | |
| What doc would help developers of the Math library? | 32 | 2800 | August 9, 2018 | |
| Use Rcpp function as rstan density function | 5 | 1101 | August 16, 2020 | |
| Hoping for some guidance / help with implementing custom log likelihood and gradient for research project (details below) | 23 | 2410 | October 18, 2021 |