I’m trying to understand what exactly does Stan when it has to deal with constrained parameters.
I read the Stan Reference Manuel but things are steel a little bit obscure for me.
I understand how and why constrained parameters have to be transformed to unconstrained parameters (thanks to chapter 10: “constraint transforms”) but I have difficulties to imagine the Hamiltonian Monte Carlo dealing with constrained and unconstrained parameters forms at the same time.
Intuitively, it will be easier to unconstrain the constrained parameters and then, to use the unconstrained forms in the HMC until the end of the sampling process. And at the end, to apply the inverse transformation to have back the desired constrained parameters…. However, Chapter 8 “Program blocks” states that during the sampling process parameters are constrained and unconstrained one a regular basis …
Could anyone explain to me a little more about this topic or advise me other references?
Thank you in advance,