Learn R Programming

updog (version 1.2.0)

obj_for_eps: Objective function for updating sequencing error rate, bias, and overdispersion parameters.

Description

Objective function for updating sequencing error rate, bias, and overdispersion parameters.

Usage

obj_for_eps(
  parvec,
  refvec,
  sizevec,
  ploidy,
  mean_bias,
  var_bias,
  mean_seq,
  var_seq,
  mean_od,
  var_od,
  wmat,
  update_bias = TRUE,
  update_seq = TRUE,
  update_od = TRUE
)

Arguments

parvec

A vector of length three. The first element is the sequencing error rate, the second element is the allele bias, and the third element is the overdispersion parameter.

refvec

A vector. The ith element is the reference count for the ith individual in the SNP.

sizevec

A vector. the ith element is the size count for the ith individual in the SNP/

ploidy

The ploidy of the species.

mean_bias

The prior mean of the log-bias.

var_bias

The prior variance of the log-bias

mean_seq

The prior mean of the logit sequencing error rate.

var_seq

The prior variance of the logit sequencing error rate.

mean_od

The prior mean of the logit of the overdispersion parameter

var_od

The prior variance of the logit of the overdispersion parameter.

wmat

The matrix of (variational) posterior probabilities for each dosage. The rows index the individuals and the columns index the dosage levels.

update_bias

A logical. This is not used in obj_for_eps, but sets the second element to 0.0 in grad_for_eps.

update_seq

A logical. This is not used in obj_for_eps, but sets the first element to 0.0 in grad_for_eps.

update_od

A logical. This is not used in obj_for_eps, but sets the third element to 0.0 in grad_for_eps.

Value

A double. The objective when updating eps in mupdog.