Hi all,
It seems like questions about Jacobian adjustments come up often enough, so I thought it might be useful to put together an explanation geared towards users who are less comfortable with math: Jacobian adjustments explained simply
This resource illustrates how Jacobian adjustments originally “clicked” for me, and FWIW I’ve received pretty positive feedback on this explanation from another Stan user who was confused by Jacobian adjustments.
The nugget of the explanation is to show how uniform densities transform via nonlinear transformations, and then to motivate the Jacobian adjustment as the term necessary to “flatten out” the starting point for the target density over the transformed parameter. One neat benefit of this line of thinking is that it becomes abundantly clear how deeply the choice of parameterization affects the posterior. I think most users who encounter the parameters
block for the first time believe that it is a weird syntactic hurdle to tell Stan what variable names to expect later on, when in fact it is far more profound, representing the choice of parameterization and therefore the choice of the implicit improper prior that gets modified by the sampling statements.
Anyhow, hope it’s useful to somebody. Comments/suggestions welcome; here’s the repo for the code.
–Jacob