Skip to content

Commit

Permalink
Fix typo in loglik computation during VEstep, mentioned in #91
Browse files Browse the repository at this point in the history
  • Loading branch information
mahendra-mariadassou committed Aug 8, 2022
1 parent c686d7b commit e154799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optim_full_cov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Rcpp::List cpp_optimize_vestep_full(
// Element-wise log-likelihood
arma::mat Z = O + X * Theta.t() + M;
arma::mat A = exp(Z + 0.5 * S2);
arma::mat loglik = sum(Y % Z - A + 0.5 * log(S2) - 0.5 * ((M * Omega) % M + S * diagmat(Omega)), 1) +
arma::mat loglik = sum(Y % Z - A + 0.5 * log(S2) - 0.5 * ((M * Omega) % M + S2 * diagmat(Omega)), 1) +
0.5 * real(log_det(Omega)) + ki(Y);

return Rcpp::List::create(
Expand Down

0 comments on commit e154799

Please sign in to comment.