Question about LKJ normalizing constant

Not really. The develop branch where the bug is fixed isn’t especially close to a release and requires C++11. The StanHeaders on CRAN is based on an orphaned branch that does not require C++11 but does not include that fix. But you just have to do something like

download.file("https://raw.githubusercontent.com/stan-dev/math/develop/stan/math/prim/mat/prob/lkj_corr_lpdf.hpp", 
destfile = system.file("include", "stan", "math", "prim", "mat", "prob", "lkj_corr_lpdf.hpp", package = "StanHeaders"))
1 Like

That indeed works. Thanks!