Skip to content

Commit

Permalink
ensure that multi_normal_suff returns an allowable value
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Aug 26, 2023
1 parent 4307b89 commit 9e7a2da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: blavaan
Title: Bayesian Latent Variable Analysis
Version: 0.4-9.1155
Version: 0.4-9.1156
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "merklee@missouri.edu",
Expand Down
2 changes: 2 additions & 0 deletions inst/stan/stanmarg.stan
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ functions { // you can use these in R following `rstan::expose_stan_functions("f
// using elementwise multiplication + sum here for efficiency
out = -.5 * N * ( sum(Supdate[1:Nobs, 1:Nobs] .* (S + (xbar - Mu) * (xbar - Mu)')) + Supdate[Nobs + 1, Nobs + 1] + Nobs * log(2 * pi()) );

if(is_nan(out) || out == positive_infinity()) out = negative_infinity();

return out;
}

Expand Down

0 comments on commit 9e7a2da

Please sign in to comment.