grad_parent_reparam: The gradient of 'obj_parent_reparam' with respect to 's',...

Description Usage Arguments Value Author(s)

View source: R/RcppExports.R

Description

The gradient of obj_parent_reparam with respect to s, ell, and r, which recall are reparameterizations of the bias, seqeuncing error, and overdispersion, respectively.

Usage

1
grad_parent_reparam(pcounts, psize, ploidy, pgeno, s, ell, r, weight = 1)

Arguments

pcounts

The number of counts of the reference allele we observe in a parent.

psize

The total number of reads we observe in a parent.

ploidy

An integer. The ploidy of the species. This is assumed to be the same for each individual.

pgeno

The genotype of the parent.

s

Same as log(bias_val) in obj_offspring.

ell

We have seq_error = expit(ell) from obj_offspring.

r

Same as log((1.0 - od_param) / od_param) from obj_offspring.

weight

A double that multiplies to the log-likelihood (objective). Should only be used when outlier = FALSE during the M step of the EM algorithm.

Value

A NumericVector of length three with the partial derivatives of s, ell, and r in that order.

Author(s)

David Gerard


dcgerard/updogAlpha documentation built on May 14, 2019, 3:10 a.m.