I'm afraid there aren't any simple examples we can point you to.
The best thing to do is run stanc and look at the generated
model code. It exposes functions that expose the log density
and gradient on the unconstrained scale (with and without Jacobian).
As to HMC and NUTS, you'll have to then trace through the
compiled command code. That used to be in stan/gm/command.hpp,
but it's moving to its own repo in CmdStan.
- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.