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
Li, H. (2011). A statistical framework for SNP calling, mutation discovery, association mapping and population genetical parameter estimation from sequencing data. Bioinformatics, 27(21), 2987-2993. doi:10.1093/bioinformatics/btr509
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]