em_li {segtest}R Documentation

EM algorithm from Li (2011)

Description

EM algorithm to estimate prior genotype probabilities from genotype likelihoods.

Usage

em_li(B, itermax = 100L, eps = 1e-05)

Arguments

B

Matrix of genotype log-likelihoods. The rows index the individuals and the columns index the genotypes.

itermax

The maximum number of iterations.

eps

The stopping criteria.

Value

A vector of log prior probabilities for each genotype.

Author(s)

David Gerard

References

Examples

# Simulate some data
set.seed(1)
gl <- simgl(nvec = c(3, 2, 4, 1, 2))
# Run em
lprob <- em_li(B = gl)
# Exponentiate to get probabilities
prob <- exp(c(lprob))
prob


[Package segtest version 2.0.0 Index]