Objective function when updating mu and sigma2.
obj_for_mu_sigma2(mu, sigma2, phifk_mat, cor_inv, log_bb_dense)
A vector, the ith element is the variational posterior mean of individual i for the SNP.
A vector, the ith element is the variational posterior variance of individual i for the SNP.
A matrix that contains the standard normal quantile of the beta-binomial cdf at dosage k for individual i. The rows index the individuals and the columns index the dosages.
The inverse of the underlying correlation matrix.
A matrix of log-densities of the beta binomial. The rows index the individuals and the columns index the allele dosage. Allele dosage goes from -1 to ploidy, so there are ploidy + 2 elements.
A double. The objective when updating mu
and sigma2
in mupdog
.