Learn R Programming

updog (version 1.2.0)

obj_for_mu_sigma2_wrapper: Wrapper for obj_for_mu_sigma2 so that I can use it in optim.

Description

Wrapper for obj_for_mu_sigma2 so that I can use it in optim.

Usage

obj_for_mu_sigma2_wrapper(muSigma2, phifk_mat, cor_inv, log_bb_dense)

Arguments

muSigma2

A vector. The first half are mu and the second half are sigma2.

phifk_mat

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.

cor_inv

The inverse of the underlying correlation matrix.

log_bb_dense

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.

Value

A double. The objective when updating mu and sigma2 in mupdog.