Learn R Programming

updog (version 1.1.3)

grad_for_weighted_lbb: Gradient for obj_for_weighted_lbb.

Description

Gradient for obj_for_weighted_lbb.

Usage

grad_for_weighted_lbb(parvec, ploidy, weight_vec)

Arguments

parvec

A vector of length 2. The first term is the current mean of the underlying beta. The second term is the current overdispersion parameter.

ploidy

The ploidy of the species.

weight_vec

A vector of length ploidy + 1 that contains the weights for each component beta-binomial.

Value

A vector of length 2. The first component is the gradient of the mean of the underlying beta. The second component is the gradient of the overdispersion parameter of the underlying beta.