Compilation error on rstan

It might be hard to search for, but it should be in there somewhere. An argument marked data is a special indicator that basically means we’ll never need to take a derivative with respect to (like things in the data block or transformed data blocks).

Variables without data might either be something we need to compute a gradient with respect to or otherwise we need to pass autodiff information through to compute gradients of something else. There’s some extra hidden work on these things.

Especially in early warmup it can do some wild things. It is surprising sometimes. Exponentiated things blow up quick too. Sometimes there are tricks to avoid these things. I remember this thread was interesting: Using integration to fit the difference of gamma distributed random variable

1 Like