sambrilleman / rstanarm

rstanarm R package for Bayesian applied regression modeling
http://mc-stan.org/interfaces/rstanarm.html
GNU General Public License v3.0
0 stars 1 forks source link

Fix bug in mvnorm density in ll_jm.R #94

Closed sambrilleman closed 6 years ago

sambrilleman commented 6 years ago

This line where the log likelihood for the random effects distribution is missing brackets around the term following the -0.5 multiplier. It should be...

ll_b <- -0.5 (c(determinant(Sigma, logarithm = TRUE)$modulus) + (b %% chol2inv(chol(Sigma)) %% b)[1] + length(b) log(2 * pi))

Need to check this updated on stan-dev branch too...