Computes matrix of relative likelihoods for each of J rows of Bhat for each of P prior covariances.
This is an internal (non-exported) function. This help page provides additional documentation mainly intended for developers and expert users.
calc_relative_lik_matrix(data, Ulist, algorithm.version = c("Rcpp", "R"))
The return value is a list containing the following components:
J x P matrix containing likelihoods p(bhat[j] + Ulist[p], V), but normalized so that the largest entry in each row is 1.
Vector which will recover the original
likelihoods; for example, lfactors[i] +
log(lik_matrix[i,])
yields the log-likelihoods corresponding
to row i of the Bhat data matrix.
A mash
data object; e.g., created by
mash_set_data
.
List containing the prior covariance matrices.
indicates R or Rcpp