Simple CAR model and log-transform

There’s a rather convoluted thread on doing a Laplace approximation to latent variables like those that you might try (I think the final working code ended up in: Algebraic sovler problems (Laplace approximation in Stan) - #30 by anon75146577) if you have to go with non-normal output.

Regarding the log gamma thing, there’s a difference. Just target += gamma_lpdf(log_tau | 2, 1); does not include the -log_tau adjustment. You need the -log_tau adjustment because you’re putting a prior on a transformed variable. Section 22.3 “Change of Variables”, page 290 from the 2.17.0 manual has some good details on what this is and where it comes from.

Lol you win some you lose some