llike_li {segtest}R Documentation

Objective function for em_li()

Description

Objective function for em_li()

Usage

llike_li(B, lpivec)

Arguments

B

The log-likelihood matrix. Rows are individuals columns are genotypes.

lpivec

The log prior vector.

Value

The log-likelihood of a vector of genotype frequencies when using genotype likelihoods. This is from Li (2011).

Author(s)

David Gerard

References

Examples

# Simulate some data
set.seed(1)
gl <- simgl(nvec = c(3, 2, 4, 1, 2))
# Log-likelihood at given log-priors
prob <- c(0.1, 0.2, 0.4, 0.2, 0.1)
lprob <- log(prob)
llike_li(B = gl, lpivec = lprob)


[Package segtest version 2.0.0 Index]