Learn R Programming

updog (version 1.1.3)

grad_for_weighted_lnorm: Gradient for obj_for_weighted_lnorm.

Description

Gradient for obj_for_weighted_lnorm.

Usage

grad_for_weighted_lnorm(parvec, ploidy, weight_vec)

Arguments

parvec

A vector of length 2. The first term is the current mean of the underlying normal. The second term is the current standard deviation (not variance) of the normal.

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 term is the derivative with respect to the mean, the second term is the derivative with respect to the standard deviation (not variance).