Learn R Programming

updog (version 1.2.0)

elbo: The evidence lower bound

Description

The evidence lower bound

Usage

elbo(
  warray,
  lbeta_array,
  cor_inv,
  postmean,
  postvar,
  bias,
  seq,
  mean_bias,
  var_bias,
  mean_seq,
  var_seq,
  ploidy
)

Arguments

warray

An three-way array. The (i,j,k)th entry is the variational posterior probability that individual i at SNP j has dosage k - 1. See compute_all_post_prob.

lbeta_array

A three-way array. The (i,j,k)th entry is the log-density of the betabinomial for individual i at SNP j and dosage k - 1. See compute_all_log_bb.

cor_inv

The inverse of the correlation matrix.

postmean

A matrix. The (i,j)th entry is the variational posterior mean for individual i at SNP j.

postvar

A matrix. The (i,j)th entry is the variational posterior variance for individual i at SNP j.

bias

A vector. The jth entry is the allele bias for SNP j.

seq

A vector. The jth entry is the sequencing error rate at SNP j.

mean_bias

The prior mean on the log-bias.

var_bias

The prior variance on the log-bias.

mean_seq

The prior mean on the logit of the sequencing error rate.

var_seq

The prior variance on the logit of the sequencing error rate.

ploidy

The ploidy of the species.

Value

A double. The evidence lower-bound that mupdog maximizes.