The transform is from (0, 1) to (-infinity, infinty) by logit. So inv_logit is the inverse. You can remember this because you differentiate the function you apply to go from unconstrained to constrained.
You probably aren’t going to be doing this. The inverse transforms we use go from unconstrained to constrained, whereas logit goes from constrained to unconstrained.
In general, the Jacobian of a (continuous, monotonic) univariate function is just the absolute value of its derivative. We work on the log scale, so we use the log of the Jacobian.
There’s a chapter of the manual that goes over exactly how Stan does the centered stick-breaking transform for the simplex and it works through the Jacobian.
I found this section on the manual, Translated and Scaled Simplex, that uses
beta = beta_scale * (SIMPLEX - 1.0 / K)
instead of what I use
beta = logit( SIMPLEX ^ (log(0.5)/log(1.0/K)) )
Although they both map the same baseline simplex [1/K, 1/K, … 1/K] to [0,0,…0] my version is more problematic (I get asymmetric posterior) and complex.
If I can avoid the use of a “decentered” logit tranformation I avoid the jacobian issue all together (do I?). In the option presented in the manual, for obtaining a nice symmetric posterior over the reals centred at 0, should I use:
SIMPLEX ~ dirichlet(...)
or
beta ~ normal(0, ..)
I was also thinking that depending on beta_scale I will need to choose the right dirichlet parameters(if I put prior on SIMPLEX), and possibly there are infinite combinations of beta_scale/dirichlet-hyper-parameter that produce the same posterior. How to behave in this scenario?
Since I didn’t find this part I assume that you were anyway talking a different section in the manual, btw.
I was talking about Chapter 36. Transformations of Constrained Variables. It shows how constrained parameters in Stan are transformed to the unconstrained scale, along with how they are transformed back and the log Jacobian determinant is calculated.