Multidimensional Integration (Multiple Integrals) in Stan

Is there any recommended way to implement multidimensional integration in Stan? I’m currently using the last released version of RStan to do some Bayesian Modeling. I’m working with some models that have an intractable normalization constant that is dependent on the model parameters and the number of dimensions I have to integrate through depends on the number of columns the input data matrix has (multidimensional model).

I know that, for example, the C++ GNU Scientific Library and the Boost library have some Monte Carlo Integration functions. Is it recommended to try to include these functions (somehow) in my Stan program?

I’d appreciate any advice you can give me. Thanks a lot.

Behind the scenes Stan is a Monte Carlo engine. Integrals in the definition of your target density can be implemented by writing out a joint density that marginalizes to that target, see for example the discussion in Estimating compound distributions without numerical integration - #2 by betanalpha. This will almost always be the more effective way to implement models with intractable normalization constants within Stan.