obj_for_mu_sigma2_wrapper
with respect for muSigma2
and a wrapper for grad_for_mu_sigma2
Gradient for obj_for_mu_sigma2_wrapper
with respect for muSigma2
and a wrapper for grad_for_mu_sigma2
grad_for_mu_sigma2_wrapper(muSigma2, phifk_mat, cor_inv, log_bb_dense)
A vector. The first half are mu and the second half are sigma2.
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 vector of length 2 * nind of numerics.
The first element n elements are the partial derivatives with respect
to mu
and the second n elements are the
partial derivatives with respect to sigma2
in obj_for_mu_sigma2
.